public getBehaviors ( ) : |
||
return | list of behaviors attached to this component |
public function getBehaviors()
{
$this->ensureBehaviors();
return $this->_behaviors;
}
/** * Getting behavior object from given model * * @param Component $model * @return SeoBehavior * @throws InvalidConfigException if model don't have our SeoBehavior */ protected static function behavior(Component $model) { foreach ($model->getBehaviors() as $b) { if ($b instanceof SeoBehavior) { return $b; } } throw new InvalidConfigException('Model ' . $model->className() . ' must have SeoBehavior'); }