Added the new placeholder area for global & component level placeholders. Just like customcode you can now with the placeholders generate dynamic behaviour with placeholders all over the JCB custom areas.
This commit is contained in:
@ -1179,6 +1179,20 @@ abstract class ComponentbuilderHelper
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* validate that a placeholder is unique
|
||||
**/
|
||||
public static function validateUniquePlaceholder($string)
|
||||
{
|
||||
$string = self::safeString($string);
|
||||
// this list may grow as we find more cases that break the compiler (just open an issue on github)
|
||||
if (in_array($string, array('component', 'view', 'views')))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* The array of dynamic content
|
||||
*
|
||||
@ -4476,6 +4490,10 @@ abstract class ComponentbuilderHelper
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_CUSTOM_CODES'), 'index.php?option=com_componentbuilder&view=custom_codes', $submenu === 'custom_codes');
|
||||
}
|
||||
if ($user->authorise('placeholder.access', 'com_componentbuilder') && $user->authorise('placeholder.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_PLACEHOLDERS'), 'index.php?option=com_componentbuilder&view=placeholders', $submenu === 'placeholders');
|
||||
}
|
||||
if ($user->authorise('library.access', 'com_componentbuilder') && $user->authorise('library.submenu', 'com_componentbuilder'))
|
||||
{
|
||||
JHtmlSidebar::addEntry(JText::_('COM_COMPONENTBUILDER_SUBMENU_LIBRARIES'), 'index.php?option=com_componentbuilder&view=libraries', $submenu === 'libraries');
|
||||
|
Reference in New Issue
Block a user