Abstract Class yeesoft\models\AbstractItem

Inheritanceyeesoft\models\AbstractItem » yeesoft\db\ActiveRecord » yii\db\ActiveRecord
Subclassesyeesoft\models\Permission, yeesoft\models\Role, yeesoft\models\Route, yeesoft\user\models\search\AbstractItemSearch, yeesoft\user\models\search\PermissionSearch, yeesoft\user\models\search\RoleSearch

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addChildren() Helper for adding children to role or permission yeesoft\models\AbstractItem
afterDelete() Invalidate permissions if some item is deleted yeesoft\models\AbstractItem
attributeLabels() yeesoft\models\AbstractItem
beforeSave() Ensure type of item yeesoft\models\AbstractItem
behaviors() yeesoft\models\AbstractItem
create() Useful helper for migrations and other stuff If description is null than it will be transformed like "editUserEmail" => "Edit user email" yeesoft\models\AbstractItem
deleteIfExists() yeesoft\models\AbstractItem
find() yeesoft\models\AbstractItem
getGroup() yeesoft\models\AbstractItem
isMultilingual() Returns TRUE if model support multilingual behavior. yeesoft\db\ActiveRecord
removeChildren() yeesoft\models\AbstractItem
rules() yeesoft\models\AbstractItem
tableName() yeesoft\models\AbstractItem
validateUniqueName() Default unique validator search only within specific class (Role, Route or Permission) because of the overwritten find() method yeesoft\models\AbstractItem

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ITEM_TYPE 0 Reassigned in child classes to type role, permission or route yeesoft\models\AbstractItem
TYPE_PERMISSION 2 yeesoft\models\AbstractItem
TYPE_ROLE 1 yeesoft\models\AbstractItem
TYPE_ROUTE 3 yeesoft\models\AbstractItem

Method Details

addChildren() public static method

Helper for adding children to role or permission

public static void addChildren ( $parentName, $childrenNames, $throwException false )
$parentName string
$childrenNames array|string
$throwException bool
throws Exception
afterDelete() public method

Invalidate permissions if some item is deleted

public void afterDelete ( )
attributeLabels() public method

public void attributeLabels ( )
beforeSave() public method

Ensure type of item

public void beforeSave ( $insert )
$insert
behaviors() public method

public void behaviors ( )
create() public static method

Useful helper for migrations and other stuff If description is null than it will be transformed like "editUserEmail" => "Edit user email"

public static static create ( $name, $description null, $groupCode null, $ruleName null, $data null )
$name string
$description null|string
$groupCode null|string
$ruleName null|string
$data null|string
deleteIfExists() public static method

public static bool deleteIfExists ( $condition )
$condition mixed
find() public static method

public static \yeesoft\models\ActiveQuery find ( )
return \yeesoft\models\ActiveQuery

The newly created \yeesoft\models\ActiveQuery instance.

getGroup() public method

public \yii\db\ActiveQuery getGroup ( )
removeChildren() public static method

public static void removeChildren ( $parentName, $childrenNames )
$parentName string
$childrenNames array|string
rules() public method

public void rules ( )
tableName() public static method

public static void tableName ( )
validateUniqueName() public method

Default unique validator search only within specific class (Role, Route or Permission) because of the overwritten find() method

public void validateUniqueName ( $attribute )
$attribute