array ( 'label' => &$GLOBALS['TL_LANG']['tl_theme']['artLayout'], 'href' => 'table=tl_article_layouts', 'icon' => 'themes.gif', 'button_callback' => array('tl_theme_eSM_artLayout', 'editArticleLayouts') ) )); /** * Provide miscellaneous methods that are used by the data configuration array. * * @author Benjamin Roth */ class tl_theme_eSM_artLayout extends \Backend { /** * Import the back end user object */ public function __construct() { parent::__construct(); $this->import('BackendUser', 'User'); } /** * Return the "edit article layouts" button * * @param $row * @param $href * @param $label * @param $title * @param $icon * @param $attributes * * @return string */ public function editArticleLayouts($row, $href, $label, $title, $icon, $attributes) { return $this->User->hasAccess('artLayout', 'themes') ? ''.Image::getHtml($icon, $label).' ' : Image::getHtml(preg_replace('/\.gif$/i', '_.gif', $icon)).' '; } }