public function editContentElement($objRow, $strBuffer) { /** * @var $objRow \ContentModel */ if (TL_MODE == 'BE') { $objRow->space = null; } $prefix = 'box'; $strClass = ContentElement::findClass($objRow->type); if (!$this->classFileExists($strClass)) { $this->log('Content element class "' . $strClass . '" (content element "' . $objRow->type . '") does not exist', 'Controller getContentElement()', TL_ERROR); return ''; } $objElement = new $strClass($objRow); $arrCssClass = explode(' ', $objElement->cssID[1]); $arrCssClass[] = $prefix . $objElement->boxSystem; $objElement->cssID = array($objElement->cssID[0], implode(' ', array_filter($arrCssClass))); $strBuffer = $objElement->generate(); return $strBuffer; }
/** * Find a content element in the TL_CTE array and return the class name * * @param string $strName The content element name * * @return string The class name * * @deprecated Deprecated since Contao 4.0, to be removed in Contao 5.0. * Use ContentElement::findClass() instead. */ public static function findContentElement($strName) { trigger_error('Using Controller::findContentElement() has been deprecated and will no longer work in Contao 5.0. Use ContentElement::findClass() instead.', E_USER_DEPRECATED); return \ContentElement::findClass($strName); }