Class pendalf89\filemanager\behaviors\MediafileBehavior
Inheritance | pendalf89\filemanager\behaviors\MediafileBehavior » yii\base\Behavior » yii\base\Object |
---|---|
Implements | yii\base\Configurable |
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$attributes | array | Owner mediafiles attributes names | pendalf89\filemanager\behaviors\MediafileBehavior |
$name | string | Owner name | pendalf89\filemanager\behaviors\MediafileBehavior |
$owner | yii\base\Component|null | The owner of this behavior | yii\base\Behavior |
Public Methods
Method | Description | Defined By |
---|---|---|
__call() | Calls the named method which is not a class method. | yii\base\Object |
__construct() | Constructor. | yii\base\Object |
__get() | Returns the value of an object property. | yii\base\Object |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\base\Object |
__set() | Sets value of an object property. | yii\base\Object |
__unset() | Sets an object property to null. | yii\base\Object |
addOwners() | Add owners to mediafile | pendalf89\filemanager\behaviors\MediafileBehavior |
attach() | Attaches the behavior object to the component. | yii\base\Behavior |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\base\Object |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\base\Object |
className() | Returns the fully qualified name of this class. | yii\base\Object |
deleteOwners() | Delete owners of mediafile | pendalf89\filemanager\behaviors\MediafileBehavior |
detach() | Detaches the behavior object from the component. | yii\base\Behavior |
events() | Declares event handlers for the $owner's events. | pendalf89\filemanager\behaviors\MediafileBehavior |
hasMethod() | Returns a value indicating whether a method is defined. | yii\base\Object |
hasProperty() | Returns a value indicating whether a property is defined. | yii\base\Object |
imageURL() | Возвращает ссылку на миниатюру, заданную через аргументы $attribute и $alias | pendalf89\filemanager\behaviors\MediafileBehavior |
init() | Initializes the object. | yii\base\Object |
updateOwners() | Update owners of mediafile | pendalf89\filemanager\behaviors\MediafileBehavior |
Property Details
Owner mediafiles attributes names
Owner name
Method Details
Add owners to mediafile
public void addOwners ( ) |
Delete owners of mediafile
public void deleteOwners ( ) |
Declares event handlers for the $owner's events.
Child classes may override this method to declare what PHP callbacks should be attached to the events of the $owner component.
The callbacks will be attached to the $owner's events when the behavior is attached to the owner; and they will be detached from the events when the behavior is detached from the component.
The callbacks can be any of the following:
- method in this behavior:
'handleClick'
, equivalent to[$this, 'handleClick']
- object method:
[$object, 'handleClick']
- static method:
['Page', 'handleClick']
- anonymous function:
function ($event) { ... }
The following is an example:
[
Model::EVENT_BEFORE_VALIDATE => 'myBeforeValidate',
Model::EVENT_AFTER_VALIDATE => 'myAfterValidate',
]
public array events ( ) | ||
return | array | Events (array keys) and the corresponding event handler methods (array values). |
---|
Возвращает ссылку на миниатюру, заданную через аргументы $attribute и $alias
public boolean|string imageURL ( $alias, $attribute = false ) | ||
$alias | string | Наименование миниатюры, задается в конфигурации filemanager |
$attribute | boolean|string | Наименование атрибута (на случай, если в поведении
|
return | boolean|string | Вернет false, если нет атрибутов или указанный не найден. |
---|
Update owners of mediafile
public void updateOwners ( ) |