trait AnchorTrait in Image Effects 8
Same name and namespace in other branches
- 8.3 src/Plugin/ImageEffect/AnchorTrait.php \Drupal\image_effects\Plugin\ImageEffect\AnchorTrait
- 8.2 src/Plugin/ImageEffect/AnchorTrait.php \Drupal\image_effects\Plugin\ImageEffect\AnchorTrait
Trait for anchor related functionalities.
Hierarchy
- trait \Drupal\image_effects\Plugin\ImageEffect\AnchorTrait
File
- src/
Plugin/ ImageEffect/ AnchorTrait.php, line 8
Namespace
Drupal\image_effects\Plugin\ImageEffectView source
trait AnchorTrait {
/**
* Returns an array of options for anchoring an image.
*
* @return array
* The array of anchor options.
*/
protected function anchorOptions() {
return [
'left-top' => $this
->t('Top left'),
'center-top' => $this
->t('Top center'),
'right-top' => $this
->t('Top right'),
'left-center' => $this
->t('Center left'),
'center-center' => $this
->t('Center'),
'right-center' => $this
->t('Center right'),
'left-bottom' => $this
->t('Bottom left'),
'center-bottom' => $this
->t('Bottom center'),
'right-bottom' => $this
->t('Bottom right'),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AnchorTrait:: |
protected | function | Returns an array of options for anchoring an image. |