public function createChildRecord($arrRow) { $GLOBALS['content_classes']['count']++; $GLOBALS['content_classes']['current'] = $GLOBALS['content_classes']['classes'][$GLOBALS['content_classes']['count']]; $tlContent = new \tl_content(); return $tlContent->addCteType($arrRow); }
public function toggleButton($row, $href, $label, $title, $icon, $attributes) { $this->Import('BackendUser', 'User'); if ($this->User->isAdmin || !in_array($row['type'], $this->User->contentelements)) { $objCallback = new tl_content(); return $objCallback->toggleIcon($row, $href, $label, $title, $icon, $attributes); } return ''; }
/** * Import the back end user object */ public function __construct() { parent::__construct(); $this->import('BackendUser', 'User'); }
public function addCteType($arrRow) { $return = parent::addCteType($arrRow); $return = GridClass::addClassesToLabels($arrRow, $return); return $return; }
public function toggleIcons($arrRow, $href, $label, $title, $icon, $attributes, $strTable, $arrRootIds, $arrChildRecordIds, $blnCircularReference, $strPrevious, $strNext) { if ($arrRow['type'] != 'colsetPart' && $arrRow['type'] != 'colsetEnd') { return parent::toggleIcon($arrRow, $href, $label, $title, $icon, $attributes); } }
/** * Hide toggle button for disabled content elements */ public function toggleButton($row, $href, $label, $title, $icon, $attributes) { if ($this->User->isAdmin || in_array($row['type'], (array) $this->User->elements)) { $objCallback = new tl_content(); return $objCallback->toggleIcon($row, $href, $label, $title, $icon, $attributes); } return ''; }
/** * Add the type of content element * @param array * @return string */ public function addContentTitle($arrRow) { $objTableContent = new \tl_content(); $strContent = $objTableContent->addCteType($arrRow); $addContentTitle = ""; if ($arrRow['elementIsBox']) { $addContentTitle = "Box-Element " . str_replace('w', '', $arrRow['boxWidth']) . "x" . str_replace('h', '', $arrRow['boxHeight']); } if (strlen($addContentTitle)) { $addContentTitle = " - " . $addContentTitle; } $strContent = preg_replace('/<div class="cte_type([A-Za-z0-9\\s\\-_]{0,})">([A-Za-z0-9\\s\\-_öäüÖÄÜß@:;,.+#*&%!?\\/\\\\(\\)\\]\\[\\{\\}\'\\"]{0,})<\\/div>/', '<div class="cte_type$1">$2' . $addContentTitle . '</div>', $strContent); return $strContent; }