Exemplo n.º 1
0
 public function getBean(Set $set = null)
 {
     $bean = parent::getBean($set);
     if ($bean !== null) {
         $this->htmlInputTemplate = $bean->{$this->_('htmlInputTemplate')};
         $this->linkedSetId = $bean->{$this->_('linkedSetId')};
     }
     return $bean;
 }
Exemplo n.º 2
0
Arquivo: Base.php Projeto: skema/skema
 public function key()
 {
     $bean = $this->field->getBean($this->set);
     $set = $this->set;
     switch ($set->keyType) {
         default:
         case Set::$keysID:
             $setKey = $set->getBean()->getID();
             $fieldKey = $bean->getID();
             break;
         case Set::$keysClean:
             $setKey = $set->getBean()->cleanName;
             $fieldKey = $bean->cleanName;
             break;
             //case Set::$keysDirty:
             //	$setKey = $set->getBean()->name;
             //	$fieldKey = $bean->name;
             //	break;
     }
     return 'skema[' . $setKey . '][' . $this->recordID . '][' . $fieldKey . ']';
 }
Exemplo n.º 3
0
 /**
  * @param Field\Base $field
  * @return Directive\*
  */
 public function fieldDirective($field)
 {
     switch ($this->keyType) {
         default:
         case Set::$keysID:
             $key = $field->getBean()->getID();
             break;
         case Set::$keysClean:
             $key = $field->cleanName;
             break;
         case Set::$keysDirty:
             $key = $field->name;
             break;
     }
     return $this->directives[$key];
 }
Exemplo n.º 4
0
 public function getBean(Set $set = null)
 {
     $bean = parent::getBean($set);
     $this->symbol = $bean->{$this->_('symbol')};
     return $bean;
 }