Example #1
0
 function addField($name, $actual_field = null)
 {
     if ($this->hasElement($name)) {
         throw $this->exception('Field with this name is already defined')->addMoreInfo('field', $name);
     }
     if ($name == 'deleted' && isset($this->api->compat)) {
         return $this->add('Field_Deleted', $name)->enum(array('Y', 'N'));
     }
     $f = parent::addField($name);
     if (!is_null($actual_field)) {
         $f->actual($actual_field);
     }
     return $f;
 }