/**
  * Get all valid fieldtypes
  *
  * @return string[] the field type identifiers for all valid fields for the current MetaModel.
  */
 public function fieldTypesCallback($objDC)
 {
     $objMetaModel = MetaModelFactory::byId($objDC->getCurrentModel()->getProperty('pid'));
     return MetaModelAttributeFactory::getAttributeTypes($objMetaModel->isTranslated(), $objMetaModel->hasVariants());
 }
Exemplo n.º 2
0
 /**
  * Create instances of all attributes that are defined for this MetaModel instance.
  * This is called internally by the first query of MetaModel::getAttributes().
  *
  * @return void
  */
 protected function createAttributes()
 {
     $arrAttributes = MetaModelAttributeFactory::getAttributesFor($this);
     foreach ($arrAttributes as $objAttribute) {
         if ($this->hasAttribute($objAttribute->getColName())) {
             continue;
         }
         $this->addAttribute($objAttribute);
     }
 }