Added option to pass user object to getActions helper method.
This commit is contained in:
parent
0b95737524
commit
9781910dd3
@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.0) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -146,11 +146,11 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 28th August, 2019
|
||||
+ *Version*: 2.10.0
|
||||
+ *Last Build*: 2nd September, 2019
|
||||
+ *Version*: 2.10.1
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **250837**
|
||||
+ *Line count*: **250924**
|
||||
+ *Field count*: **1343**
|
||||
+ *File count*: **1608**
|
||||
+ *Folder count*: **253**
|
||||
|
@ -12,7 +12,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
|
||||
|
||||
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will safe you lots of time and money. A real must have!
|
||||
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.0) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
You can install it quite easily and with no limitations. On [github](https://github.com/vdm-io/Joomla-Component-Builder/releases) is the latest release (2.10.1) with **ALL** its features and **ALL** concepts totally open-source and free!
|
||||
|
||||
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
|
||||
|
||||
@ -146,11 +146,11 @@ TODO
|
||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||
+ *First Build*: 30th April, 2015
|
||||
+ *Last Build*: 28th August, 2019
|
||||
+ *Version*: 2.10.0
|
||||
+ *Last Build*: 2nd September, 2019
|
||||
+ *Version*: 2.10.1
|
||||
+ *Copyright*: Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.
|
||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||
+ *Line count*: **250837**
|
||||
+ *Line count*: **250924**
|
||||
+ *Field count*: **1343**
|
||||
+ *File count*: **1608**
|
||||
+ *Folder count*: **253**
|
||||
|
@ -308,14 +308,19 @@ abstract class ###Component###Helper
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
* @param object $user The user whose permissions we are loading
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###')
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
// load the user if not given
|
||||
if (!self::checkObject($user))
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
}
|
||||
// load the JObject
|
||||
$result = new JObject;
|
||||
// make view name safe (just incase)
|
||||
|
@ -654,14 +654,19 @@ abstract class ###Component###Helper
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
* @param object $user The user whose permissions we are loading
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###')
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = '###component###', $user = 'null')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
// load the user if not given
|
||||
if (!self::checkObject($user))
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
}
|
||||
// load the JObject
|
||||
$result = new JObject;
|
||||
// make view name safe (just incase)
|
||||
|
@ -5942,14 +5942,19 @@ abstract class ComponentbuilderHelper
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
* @param object $user The user whose permissions we are loading
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder')
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder', $user = 'null')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
// load the user if not given
|
||||
if (!self::checkObject($user))
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
}
|
||||
// load the JObject
|
||||
$result = new JObject;
|
||||
// make view name safe (just incase)
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="component" version="3.2" method="upgrade">
|
||||
<name>COM_COMPONENTBUILDER</name>
|
||||
<creationDate>28th August, 2019</creationDate>
|
||||
<creationDate>2nd September, 2019</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||
<copyright>Copyright (C) 2015 - 2019 Vast Development Method. All rights reserved.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<version>2.10.0</version>
|
||||
<version>2.10.1</version>
|
||||
<description><![CDATA[
|
||||
<h1>Component Builder (v.2.10.0)</h1>
|
||||
<h1>Component Builder (v.2.10.1)</h1>
|
||||
<div style="clear: both;"></div>
|
||||
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.
|
||||
|
||||
|
@ -803,10 +803,10 @@
|
||||
<description>Builds Complex Joomla Components</description>
|
||||
<element>com_componentbuilder</element>
|
||||
<type>component</type>
|
||||
<version>2.10.0</version>
|
||||
<version>2.10.1</version>
|
||||
<infourl title="Component Builder!">http://www.joomlacomponentbuilder.com</infourl>
|
||||
<downloads>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.0/JCB_v2.10.0.zip</downloadurl>
|
||||
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Component-Builder/releases/download/v2.10.1/JCB_v2.10.1.zip</downloadurl>
|
||||
</downloads>
|
||||
<tags>
|
||||
<tag>stable</tag>
|
||||
|
@ -7637,7 +7637,7 @@ class com_componentbuilderInstallerScript
|
||||
echo '<a target="_blank" href="http://www.joomlacomponentbuilder.com" title="Component Builder">
|
||||
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
|
||||
</a>
|
||||
<h3>Upgrade to Version 2.10.0 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
<h3>Upgrade to Version 2.10.1 Was Successful! Let us know if anything is not working as expected.</h3>';
|
||||
|
||||
// Create the componentbuilder action logs extensions object.
|
||||
$componentbuilder_action_logs_extensions = new stdClass();
|
||||
|
@ -6022,14 +6022,19 @@ abstract class ComponentbuilderHelper
|
||||
* @param string $views The related list view name
|
||||
* @param mixed $target Only get this permission (like edit, create, delete)
|
||||
* @param string $component The target component
|
||||
* @param object $user The user whose permissions we are loading
|
||||
*
|
||||
* @return object The JObject of permission/authorised actions
|
||||
*
|
||||
**/
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder')
|
||||
public static function getActions($view, &$record = null, $views = null, $target = null, $component = 'componentbuilder', $user = 'null')
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
// load the user if not given
|
||||
if (!self::checkObject($user))
|
||||
{
|
||||
// get the user object
|
||||
$user = JFactory::getUser();
|
||||
}
|
||||
// load the JObject
|
||||
$result = new JObject;
|
||||
// make view name safe (just incase)
|
||||
|
Loading…
Reference in New Issue
Block a user