Пример #1
1
 public function getHotlinkTo(Model $model, $action = null, $options = [])
 {
     if (!ArrayHelper::isIn($this->className(), ArrayHelper::getColumn($model->behaviors(), 'class'))) {
         throw new InvalidRouteException('The "LinkableBehavior" is not attached to the specified model');
     }
     return $this->getHotlink(strtr('{route}/{action}', ['{route}' => $model->route, '{action}' => $action ?? $model->defaultAction]), $model->linkableParams, $options);
 }