Class pendalf89\filemanager\behaviors\MediafileBehavior

Inheritancependalf89\filemanager\behaviors\MediafileBehavior » yii\base\Behavior » yii\base\Object
Implementsyii\base\Configurable

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Hide inherited methods

MethodDescriptionDefined 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

$attributes public property

Owner mediafiles attributes names

public array $attributes = []
$name public property

Owner name

public string $name ''

Method Details

addOwners() public method

Add owners to mediafile

public void addOwners ( )
deleteOwners() public method

Delete owners of mediafile

public void deleteOwners ( )
events() public method

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).

imageURL() public method

Возвращает ссылку на миниатюру, заданную через аргументы $attribute и $alias

public boolean|string imageURL ( $alias, $attribute false )
$alias string

Наименование миниатюры, задается в конфигурации filemanager

$attribute boolean|string

Наименование атрибута (на случай, если в поведении

                          казано несколько атрибутов)
return boolean|string

Вернет false, если нет атрибутов или указанный не найден.

updateOwners() public method

Update owners of mediafile

public void updateOwners ( )