コード例 #1
0
 public function attach($owner)
 {
     parent::attach($owner);
     if (!isset($this->baseRoute)) {
         $this->baseRoute = '/' . strtolower(get_class($this->owner));
     }
     // assume the model name is the same as the controller
     if (!isset($this->viewRoute)) {
         $this->viewRoute = $this->baseRoute;
     }
     if (!isset($this->autoCompleteSource)) {
         $this->autoCompleteSource = $this->baseRoute . '/getItems';
     }
     // assume the model name is the same as the controller
 }
コード例 #2
0
ファイル: DateTimeBehavior.php プロジェクト: Cranky4/npfs
 public function attach($owner)
 {
     parent::attach($owner);
     $owner->getValidatorList()->add(CValidator::createValidator('safe', $this->owner, array('dateTimes')));
 }
コード例 #3
0
 /**
  * @see UploadingBehavior.
  */
 public function attach($owner)
 {
     parent::attach($owner);
     $this->_component->attach();
 }