for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace hipanel\modules\hosting\menus;
use hiqdev\menumanager\Menu;
use Yii;
class AccountDetailMenu extends Menu
{
public $model;
public $blockReasons = [];
public function items()
return [
[
'label' => $this->renderView('_change-password', ['model' => $this->model]),
'encode' => false,
],
'label' => $this->renderView('_manage-ip-restrictions', ['model' => $this->model]),
'label' => $this->renderView('_mail-settings', ['model' => $this->model]),
'visible' => $this->model->canSetMailSettings(),
'label' => $this->renderView('_block', ['model' => $this->model, 'blockReasons' => $this->blockReasons]),
'visible' => Yii::$app->user->can('support') && Yii::$app->user->id !== $this->model->client_id,
'label' => $this->renderView('_delete', ['model' => $this->model]),
];
}
public function getViewPath()
return '@vendor/hiqdev/hipanel-module-hosting/src/views/account';