Ejemplo n.º 1
0
 /**
  * This is called after construction so that fields can finish
  * constructing themselves with a copy of the column it represents.
  *
  * @param   string  $model
  * @param   string  $column
  * @return  void
  **/
 public function initialize(Jam_Meta $meta, $name)
 {
     // This will come in handy for setting complex relationships
     if (!$this->model) {
         $this->model = $meta->model();
     }
     // This is for naming form fields
     $this->name = $name;
     // Check for a name, because we can easily provide a default
     if (!$this->label) {
         $this->label = Inflector::humanize($name);
     }
     $meta->events()->discover_events($this, Jam_Event::ATTRIBUTE_PRIORITY);
 }
Ejemplo n.º 2
0
 /**
  * Initialize.
  *
  * @param   Jam_Meta  $meta
  * @param   string       $name
  * @return  void
  */
 public function initialize(Jam_Meta $meta, $name)
 {
     $this->_name = $name;
     $this->_model = $meta->model();
     $meta->events()->discover_events($this, Jam_Event::BEHAVIOR_PRIORITY);
 }