protected function BlazyUnitTestTrait::getDefaultFormatterDefinition in Blazy 8.2
Same name and namespace in other branches
- 8 tests/src/Traits/BlazyUnitTestTrait.php \Drupal\Tests\blazy\Traits\BlazyUnitTestTrait::getDefaultFormatterDefinition()
Returns the default field formatter definition.
Return value
array The default field formatter settings.
3 calls to BlazyUnitTestTrait::getDefaultFormatterDefinition()
- BlazyAdminExtendedUnitTest::testBuildSettingsForm in tests/
src/ Unit/ Form/ BlazyAdminExtendedUnitTest.php - Tests BlazyAdminExtended.
- BlazyAdminFormatterUnitTest::testBuildSettingsForm in tests/
src/ Unit/ Form/ BlazyAdminFormatterUnitTest.php - @covers ::buildSettingsForm @covers ::openingForm @covers ::imageStyleForm @covers ::mediaSwitchForm @covers ::gridForm @covers ::closingForm @covers ::finalizeForm
- BlazyUnitTestTrait::getFormatterDefinition in tests/
src/ Traits/ BlazyUnitTestTrait.php - Returns the field formatter definition along with settings.
File
- tests/
src/ Traits/ BlazyUnitTestTrait.php, line 96
Class
- BlazyUnitTestTrait
- A Trait common for Blazy Unit tests.
Namespace
Drupal\Tests\blazy\TraitsCode
protected function getDefaultFormatterDefinition() {
// @todo Will be replaced by `form` array below.
$deprecated = [
'grid_form' => TRUE,
'image_style_form' => TRUE,
'fieldable_form' => TRUE,
'media_switch_form' => TRUE,
];
return [
'background' => TRUE,
'box_captions' => TRUE,
'captions' => [
'alt' => 'Alt',
'title' => 'Title',
],
'classes' => [
'field_class' => 'Classes',
],
'multimedia' => TRUE,
'images' => [
$this->testFieldName => $this->testFieldName,
],
'layouts' => [
'top' => 'Top',
],
'links' => [
'field_link' => 'Link',
],
'namespace' => 'blazy',
'responsive_image' => TRUE,
'thumbnail_style' => TRUE,
'skins' => [
'classic' => 'Classic',
],
'style' => 'grid',
'target_type' => 'file',
'titles' => [
'field_text' => 'Text',
],
'view_mode' => 'default',
'settings' => $this
->getFormatterSettings(),
'form' => [
'fieldable',
'grid',
'image_style',
'media_switch',
],
] + $deprecated + $this
->getDefaultFieldDefinition();
}