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 }
public function attach($owner) { parent::attach($owner); $owner->getValidatorList()->add(CValidator::createValidator('safe', $this->owner, array('dateTimes'))); }
/** * @see UploadingBehavior. */ public function attach($owner) { parent::attach($owner); $this->_component->attach(); }