public setImageIf ( boolean | string | array $isAllowed, string $source = '', string $url = '', string $cssClass = '', string $alt = '' ) : MediaItemModule | ||
$isAllowed | boolean | string | array | Either a boolean to indicate whether to actually add the item or a permission string or array of permission strings (full match) to check. |
$source | string | The image source url. The function DOES NOT handle the url()-ing. |
$url | string | The image anchor link, if the image is an anchor. The function DOES NOT handle the url()-ing. |
$cssClass | string | The CSS class for the image. |
$alt | string | The image alt. |
Результат | MediaItemModule | $this |