예제 #1
0
 /**
  * Override parent getter to call getResults() if data hasn't been populated
  * @param string $key
  */
 public function __get($key)
 {
     if ($key == 'data' && empty($this->options['data']) && isset($this->relation)) {
         $this->options['data'] = $this->relation->getResults();
     }
     return parent::__get($key);
 }
 public function __construct($name, $data, $options = array())
 {
     parent::__construct($name, $data, $options);
     // add a class for javascript to attach
     $this->attributes['class'][] = 'pt-colorpicker';
 }
예제 #3
0
파일: File.php 프로젝트: packettide/bree
 public function __construct($name, $data, $options = array())
 {
     // Add another reserved attribute for file fieldtype
     array_push($this->reserved, 'directory');
     parent::__construct($name, $data, $options);
 }