@@ -65,12 +65,12 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | public function getCMSFields() |
| 67 | 67 | { |
| 68 | - $this->beforeUpdateCMSFields(function (FieldList $fields) { |
|
| 68 | + $this->beforeUpdateCMSFields(function(FieldList $fields) { |
|
| 69 | 69 | $allColumnsField = $fields->dataFieldByName('AllColumns'); |
| 70 | 70 | $allColumnsField->addExtraClass('ckan-columns__all-columns'); |
| 71 | 71 | |
| 72 | 72 | $fields->dataFieldByName('FilterLabel')->setDescription(_t( |
| 73 | - __CLASS__ . '.FILTERLABEL_DESCRIPTION', |
|
| 73 | + __CLASS__.'.FILTERLABEL_DESCRIPTION', |
|
| 74 | 74 | 'Provide an appropriate label for the filter. For example, “Search locations”' |
| 75 | 75 | )); |
| 76 | 76 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | $columnSources = CompositeField::create($allColumnsField, $filterFields); |
| 89 | 89 | $columnSources |
| 90 | - ->setTitle(_t(__CLASS__ . '.COLUMNS_SOURCES', 'Columns source(s)')) |
|
| 90 | + ->setTitle(_t(__CLASS__.'.COLUMNS_SOURCES', 'Columns source(s)')) |
|
| 91 | 91 | ->addExtraClass('ckan-columns__sources'); |
| 92 | 92 | $fields->addFieldToTab('Root.Main', $columnSources); |
| 93 | 93 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | 'id' => $this->ID, |
| 142 | 142 | 'label' => $this->FilterLabel, |
| 143 | 143 | 'allColumns' => (bool) $this->AllColumns, |
| 144 | - 'columns' => $this->AllColumns ? null : array_map(function (ResourceField $field) { |
|
| 144 | + 'columns' => $this->AllColumns ? null : array_map(function(ResourceField $field) { |
|
| 145 | 145 | return [ |
| 146 | 146 | 'label' => $field->ReadableLabel, |
| 147 | 147 | 'target' => $field->OriginalLabel, |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | return DBField::create_Field( |
| 163 | 163 | 'HTMLFragment', |
| 164 | 164 | '<span class="ckan-columns--all-columns">' |
| 165 | - . _t(__CLASS__ . '.ALL_COLUMNS', 'All columns') |
|
| 165 | + . _t(__CLASS__.'.ALL_COLUMNS', 'All columns') |
|
| 166 | 166 | . '</span>' |
| 167 | 167 | ); |
| 168 | 168 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | return DBField::create_Field( |
| 179 | 179 | 'HTMLFragment', |
| 180 | 180 | '<span class="ckan-columns--multiple">' |
| 181 | - . _t(__CLASS__ . '.MULTIPLE_COLUMNS', 'Multiple columns') |
|
| 181 | + . _t(__CLASS__.'.MULTIPLE_COLUMNS', 'Multiple columns') |
|
| 182 | 182 | . '</span>' |
| 183 | 183 | ); |
| 184 | 184 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | public function onAfterWrite() |
| 49 | 49 | { |
| 50 | 50 | if ($this->Identifier && $this->isChanged('Identifier')) { |
| 51 | - $this->Fields()->each(function (ResourceField $field) { |
|
| 51 | + $this->Fields()->each(function(ResourceField $field) { |
|
| 52 | 52 | $field->delete(); |
| 53 | 53 | }); |
| 54 | 54 | |
@@ -58,11 +58,11 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | // Remove the existing filters and add a default text entry to search all ResourceFields |
| 60 | 60 | $this->Filters() |
| 61 | - ->each(function (ResourceFilter $filter) { |
|
| 61 | + ->each(function(ResourceFilter $filter) { |
|
| 62 | 62 | $filter->delete(); |
| 63 | 63 | }) |
| 64 | 64 | ->add(ResourceFilter::create([ |
| 65 | - 'FilterLabel' => _t(self::class . '.DEFAULT_FILTER_LABEL', 'Search'), |
|
| 65 | + 'FilterLabel' => _t(self::class.'.DEFAULT_FILTER_LABEL', 'Search'), |
|
| 66 | 66 | ])); |
| 67 | 67 | } |
| 68 | 68 | |
@@ -138,8 +138,8 @@ |
||
| 138 | 138 | |
| 139 | 139 | protected function assertArrayEqualsInOrder($expected, $actual) |
| 140 | 140 | { |
| 141 | - $message = 'Failed asserting array in order. Expected ' . print_r($expected, true) . |
|
| 142 | - '. Actual: ' . print_r($actual, true); |
|
| 141 | + $message = 'Failed asserting array in order. Expected '.print_r($expected, true). |
|
| 142 | + '. Actual: '.print_r($actual, true); |
|
| 143 | 143 | |
| 144 | 144 | foreach ($actual as $key => $value) { |
| 145 | 145 | $expectedKey = key($expected); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | { |
| 42 | 42 | $data = ArrayData::create([ |
| 43 | 43 | 'Resource' => $this->resource, |
| 44 | - 'EditLinkTitle' => _t(__CLASS__ . '.EDIT_LINK_TITLE', 'Edit resource'), |
|
| 44 | + 'EditLinkTitle' => _t(__CLASS__.'.EDIT_LINK_TITLE', 'Edit resource'), |
|
| 45 | 45 | 'ReadOnly' => $gridField->isReadonly(), |
| 46 | 46 | ]); |
| 47 | 47 | $result = $data->renderWith(__CLASS__); |