@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | 'resourceName' => $resource->ResourceName, |
| 46 | 46 | 'basePath' => $this->getBasePath($holder), |
| 47 | 47 | 'fields' => array_map( |
| 48 | - function (ResourceField $field) { |
|
| 48 | + function(ResourceField $field) { |
|
| 49 | 49 | return [ |
| 50 | 50 | 'OriginalLabel' => $field->OriginalLabel, |
| 51 | 51 | 'ReadableLabel' => $field->ReadableLabel, |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | ])->Sort('Position', 'ASC')->toArray() |
| 63 | 63 | ), |
| 64 | 64 | 'filters' => array_map( |
| 65 | - function (ResourceFilter $filter) { |
|
| 65 | + function(ResourceFilter $filter) { |
|
| 66 | 66 | $explodedClassName = explode('\\', get_class($filter)); |
| 67 | 67 | return [ |
| 68 | 68 | 'type' => array_pop($explodedClassName), |
@@ -90,6 +90,6 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $link = $holder->RelativeLink(); |
| 93 | - return Director::baseURL() . trim($link, '/'); |
|
| 93 | + return Director::baseURL().trim($link, '/'); |
|
| 94 | 94 | } |
| 95 | 95 | } |
@@ -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 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | return [ |
| 141 | 141 | 'label' => $this->FilterLabel, |
| 142 | 142 | 'allColumns' => $this->AllColumns, |
| 143 | - 'columns' => $this->AllColumns ? null : array_map(function (ResourceField $field) { |
|
| 143 | + 'columns' => $this->AllColumns ? null : array_map(function(ResourceField $field) { |
|
| 144 | 144 | return [ |
| 145 | 145 | 'label' => $field->ReadableLabel, |
| 146 | 146 | 'target' => $field->OriginalLabel, |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | return DBField::create_Field( |
| 162 | 162 | 'HTMLFragment', |
| 163 | 163 | '<span class="ckan-columns--all-columns">' |
| 164 | - . _t(__CLASS__ . '.ALL_COLUMNS', 'All columns') |
|
| 164 | + . _t(__CLASS__.'.ALL_COLUMNS', 'All columns') |
|
| 165 | 165 | . '</span>' |
| 166 | 166 | ); |
| 167 | 167 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | return DBField::create_Field( |
| 178 | 178 | 'HTMLFragment', |
| 179 | 179 | '<span class="ckan-columns--multiple">' |
| 180 | - . _t(__CLASS__ . '.MULTIPLE_COLUMNS', 'Multiple columns') |
|
| 180 | + . _t(__CLASS__.'.MULTIPLE_COLUMNS', 'Multiple columns') |
|
| 181 | 181 | . '</span>' |
| 182 | 182 | ); |
| 183 | 183 | } |
@@ -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 | |