@@ -80,15 +80,15 @@ |
||
80 | 80 | $object = singleton(BlockSet::class); |
81 | 81 | $expected = [ |
82 | 82 | 'BLOCKSET_EDIT' => [ |
83 | - 'name' => _t('BlockSet.EditBlockSet','Edit a Block Set'), |
|
83 | + 'name' => _t('BlockSet.EditBlockSet', 'Edit a Block Set'), |
|
84 | 84 | 'category' => _t('Block.PermissionCategory', 'Blocks'), |
85 | 85 | ], |
86 | 86 | 'BLOCKSET_DELETE' => [ |
87 | - 'name' => _t('BlockSet.DeleteBlockSet','Delete a Block Set'), |
|
87 | + 'name' => _t('BlockSet.DeleteBlockSet', 'Delete a Block Set'), |
|
88 | 88 | 'category' => _t('Block.PermissionCategory', 'Blocks'), |
89 | 89 | ], |
90 | 90 | 'BLOCKSET_CREATE' => [ |
91 | - 'name' => _t('BlockSet.CreateBlockSet','Create a Block Set'), |
|
91 | + 'name' => _t('BlockSet.CreateBlockSet', 'Create a Block Set'), |
|
92 | 92 | 'category' => _t('Block.PermissionCategory', 'Blocks'), |
93 | 93 | ], |
94 | 94 | ]; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | public function fieldLabels($includerelations = true) |
76 | 76 | { |
77 | - $labels = parent::fieldLabels($includerelations); |
|
77 | + $labels = parent::fieldLabels($includerelations); |
|
78 | 78 | |
79 | 79 | $labels = array_merge($labels, [ |
80 | 80 | 'singular_name' => _t('Block.BlockType', 'Block Type'), |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $self = $this; |
139 | 139 | $this->beforeUpdateCMSFields(function($fields) use($self) { |
140 | 140 | /** @var FieldList $fields */ |
141 | - Requirements::add_i18n_javascript(BLOCKS_DIR . '/javascript/lang'); |
|
141 | + Requirements::add_i18n_javascript(BLOCKS_DIR.'/javascript/lang'); |
|
142 | 142 | |
143 | 143 | // this line is a temporary patch until I can work out why this dependency isn't being |
144 | 144 | // loaded in some cases... |
@@ -445,9 +445,9 @@ discard block |
||
445 | 445 | { |
446 | 446 | $obj = DBHTMLText::create(); |
447 | 447 | if ($this->isPublished()) { |
448 | - $obj->setValue('<img src="' . FRAMEWORK_ADMIN_DIR . '/images/alert-good.gif" />'); |
|
448 | + $obj->setValue('<img src="'.FRAMEWORK_ADMIN_DIR.'/images/alert-good.gif" />'); |
|
449 | 449 | } else { |
450 | - $obj->setValue('<img src="' . FRAMEWORK_ADMIN_DIR . '/images/alert-bad.gif" />'); |
|
450 | + $obj->setValue('<img src="'.FRAMEWORK_ADMIN_DIR.'/images/alert-bad.gif" />'); |
|
451 | 451 | } |
452 | 452 | return $obj; |
453 | 453 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $fields->addFieldToTab('Root.Main', MultiValueCheckboxField::create('PageTypes', _t('BlockSet.OnlyApplyToThesePageTypes', 'Only apply to these Page Types:'), $this->pageTypeOptions()) |
79 | 79 | ->setDescription(_t('BlockSet.OnlyApplyToThesePageTypesDescription', 'Selected Page Types will inherit this Block Set automatically. Leave all unchecked to apply to all page types.'))); |
80 | 80 | $fields->addFieldToTab('Root.Main', TreeMultiselectField::create('PageParents', _t('BlockSet.OnlyApplyToChildrenOfThesePages', 'Only apply to children of these Pages:'), 'SilverStripe\\CMS\\Model\\SiteTree')); |
81 | - $fields->addFieldToTab('Root.Main', CheckboxField::create('IncludePageParent', _t('BlockSet.ApplyBlockSetToSelectedPageParentsAsWellAsChildren','Apply block set to selected page parents as well as children'))); |
|
81 | + $fields->addFieldToTab('Root.Main', CheckboxField::create('IncludePageParent', _t('BlockSet.ApplyBlockSetToSelectedPageParentsAsWellAsChildren', 'Apply block set to selected page parents as well as children'))); |
|
82 | 82 | |
83 | 83 | if (!$this->ID) { |
84 | 84 | $fields->addFieldToTab('Root.Main', LiteralField::create('NotSaved', "<p class='message warning'>"._t('BlockSet.YouCanAddBlocksToThisSetOnceYouHaveSavedIt', 'You can add Blocks to this set once you have saved it for the first time').'</p>')); |
@@ -168,15 +168,15 @@ discard block |
||
168 | 168 | { |
169 | 169 | return [ |
170 | 170 | 'BLOCKSET_EDIT' => [ |
171 | - 'name' => _t('BlockSet.EditBlockSet','Edit a Block Set'), |
|
171 | + 'name' => _t('BlockSet.EditBlockSet', 'Edit a Block Set'), |
|
172 | 172 | 'category' => _t('Block.PermissionCategory', 'Blocks'), |
173 | 173 | ], |
174 | 174 | 'BLOCKSET_DELETE' => [ |
175 | - 'name' => _t('BlockSet.DeleteBlockSet','Delete a Block Set'), |
|
175 | + 'name' => _t('BlockSet.DeleteBlockSet', 'Delete a Block Set'), |
|
176 | 176 | 'category' => _t('Block.PermissionCategory', 'Blocks'), |
177 | 177 | ], |
178 | 178 | 'BLOCKSET_CREATE' => [ |
179 | - 'name' => _t('BlockSet.CreateBlockSet','Create a Block Set'), |
|
179 | + 'name' => _t('BlockSet.CreateBlockSet', 'Create a Block Set'), |
|
180 | 180 | 'category' => _t('Block.PermissionCategory', 'Blocks'), |
181 | 181 | ], |
182 | 182 | ]; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | 'Title' => array('title' => _t('Block.Title', 'Title'), 'field' => 'Silverstripe\\Forms\\ReadonlyField'), |
54 | 54 | 'BlockArea' => array( |
55 | 55 | 'title' => _t('Block.BlockArea', 'Block Area'), |
56 | - 'callback' => function () use ($areasFieldSource) { |
|
56 | + 'callback' => function() use ($areasFieldSource) { |
|
57 | 57 | $areasField = DropdownField::create('BlockArea', 'Block Area', $areasFieldSource); |
58 | 58 | if (count($areasFieldSource) > 1) { |
59 | 59 | $areasField->setHasEmptyDefault(true); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($aboveOrBelow) { |
69 | 69 | $displayfields['AboveOrBelow'] = array( |
70 | 70 | 'title' => _t('GridFieldConfigBlockManager.AboveOrBelow', 'Above or Below'), |
71 | - 'callback' => function () { |
|
71 | + 'callback' => function() { |
|
72 | 72 | return DropdownField::create('AboveOrBelow', _t('GridFieldConfigBlockManager.AboveOrBelow', 'Above or Below'), BlockSet::config()->get('above_or_below_options')); |
73 | 73 | }, |
74 | 74 | ); |
@@ -139,7 +139,7 @@ |
||
139 | 139 | } else { |
140 | 140 | $fields->addFieldToTab('Root.Blocks', |
141 | 141 | ReadonlyField::create('DisabledBlocksReadOnly', _t('BlocksSiteTreeExtension.DisableInheritedBlocks', 'Disable Inherited Blocks'), |
142 | - _t('BlocksSiteTreeExtension.NoInheritedBlocksToDisable','This page has no inherited blocks to disable.'))); |
|
142 | + _t('BlocksSiteTreeExtension.NoInheritedBlocksToDisable', 'This page has no inherited blocks to disable.'))); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $fields->addFieldToTab('Root.Blocks', |