/** * Protected constructor for singleton instance. */ protected function __construct() { parent::__construct(); // toggling of a render setting? if ($this->Input->get('tid') && $this->Input->get('table') == 'tl_metamodel_rendersetting') { // Update database $this->Database->prepare(' UPDATE tl_metamodel_rendersetting SET enabled=? WHERE id=?')->execute($this->Input->get('state') == '1' ? '1' : '', $this->Input->get('tid')); exit; } }
public function encodeNameAndDescription($varValue, $objDC) { return parent::encodeLangArray($varValue, $this->getMetaModelFromDC($objDC)); }
/** * Get a list with all allowed attributes for meta description. * * @param DataContainer $objDC * * @return array A list with all found attributes. */ public function getMetaDescriptionAttributes(DataContainer $objDC) { $objTableHelper = new TableMetaModelHelper(); return $objTableHelper->getAttributeNamesForModel($objDC->activeRecord->metamodel, (array) $GLOBALS['METAMODELS']['metainformation']['allowedDescription']); }
/** * Protected constructor for singleton instance. */ protected function __construct() { parent::__construct(); }
/** * Retrieve the current values of the model and create the title widget information. * * @param InterfaceGeneralModel $objModel the current Model active in the DC. * * @param DC_General $objDC the Datacontainer calling us. */ public function onModelUpdatedCallback($objModel, $objDC) { // do nothing if not in edit mode. if (!($this->Input->get('act') == 'create' || $this->Input->get('act') == 'edit')) { return; } $this->objectsFromUrl($objDC); $GLOBALS['TL_DCA']['tl_metamodel_dcasetting']['fields']['legendtitle'] = array_replace_recursive(parent::makeMultiColumnName($this->objMetaModel, $GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_langcode'], $GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_value'], false, $objModel->getProperty('legendtitle')), $GLOBALS['TL_DCA']['tl_metamodel_dcasetting']['fields']['legendtitle']); }