public function getSourceColumnNames(DataContainer $objDC) { $arrFields = array(); if ($objDC->getCurrentModel() && $this->Database->tableExists($objDC->getCurrentModel()->getProperty('select_srctable'))) { foreach ($this->Database->listFields($objDC->getCurrentModel()->getProperty('select_srctable')) as $arrInfo) { if ($arrInfo['type'] != 'index') { $arrFields[$arrInfo['name']] = $arrInfo['name']; } } } return $arrFields; }
/** * Fetch the template group for the detail view of the current MetaModel module. * * @param DataContainer $objDC the datacontainer calling this method. * * @return array * */ public function getTemplates(DataContainer $objDC) { if (!$this->objMetaModel) { return array(); } $objAttribute = $this->objMetaModel->getAttributeById($objDC->getCurrentModel()->getProperty('attr_id')); if (!$objAttribute) { return array(); } return $this->getTemplatesForBase('mm_attr_' . $objAttribute->get('type')); }
/** * Return all valid modes for the current MetaModels rendertype. * * @param DataContainer $objDC The DataContainer instance that called the method. * * @return array */ public function getValidModes(DataContainer $objDC) { $arrResult = array(); switch ($objDC->getCurrentModel()->getProperty('rendertype')) { case 'ctable': $arrResult = array('mode_3', 'mode_4', 'mode_6'); break; case 'standalone': $arrResult = array('mode_0', 'mode_1', 'mode_2', 'mode_5'); break; default: $arrResult = array(); break; } return $arrResult; }