| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | |
| 30 | 30 | public function getCMSFields() | 
| 31 | 31 |      { | 
| 32 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 32 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 33 | 33 |              $fields->removeByName('RedirectorDescHeader'); | 
| 34 | 34 |              $fields->removeByName('RedirectionType'); | 
| 35 | 35 |              $fields->removeByName('LinkToID'); | 
| @@ -66,7 +66,7 @@ | ||
| 66 | 66 | |
| 67 | 67 | public function getCMSFields() | 
| 68 | 68 |      { | 
| 69 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 69 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 70 | 70 | // Main Content tab | 
| 71 | 71 | $fields->addFieldToTab( | 
| 72 | 72 | 'Root.Main', | 
| @@ -55,7 +55,7 @@ | ||
| 55 | 55 | |
| 56 | 56 | public function getCMSFields() | 
| 57 | 57 |      { | 
| 58 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 58 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 59 | 59 | $fields->addFieldToTab( | 
| 60 | 60 | 'Root.Main', | 
| 61 | 61 |                  $dateTimeField = DatetimeField::create('Date', $this->fieldLabel('Date')), | 
| @@ -134,8 +134,8 @@ discard block | ||
| 134 | 134 | |
| 135 | 135 | // Filter down to single month. | 
| 136 | 136 |          if (isset($year) && isset($monthNumber)) { | 
| 137 | - $year = (int)$year; | |
| 138 | - $monthNumber = (int)$monthNumber; | |
| 137 | + $year = (int) $year; | |
| 138 | + $monthNumber = (int) $monthNumber; | |
| 139 | 139 | |
| 140 | 140 |              $beginDate = sprintf("%04d-%02d-01 00:00:00", $year, $monthNumber); | 
| 141 | 141 |              $endDate = date('Y-m-d H:i:s', strtotime("{$beginDate} +1 month")); | 
| @@ -215,7 +215,7 @@ discard block | ||
| 215 | 215 | // Check if the currently processed month is the one that is selected via GET params. | 
| 216 | 216 | $active = false; | 
| 217 | 217 |              if (isset($year) && isset($monthNumber)) { | 
| 218 | - $active = (((int)$currentYear)==$year && ((int)$currentMonthNumber)==$monthNumber); | |
| 218 | + $active = (((int) $currentYear) == $year && ((int) $currentMonthNumber) == $monthNumber); | |
| 219 | 219 | } | 
| 220 | 220 | |
| 221 | 221 | // Build the link - keep the tag and date filter, but reset the pagination. | 
| @@ -64,7 +64,7 @@ | ||
| 64 | 64 | |
| 65 | 65 | public function getCMSFields() | 
| 66 | 66 |      { | 
| 67 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 67 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 68 | 68 |              $fields->removeByName('Date'); | 
| 69 | 69 | |
| 70 | 70 | $dateTimeFields = array(); | 
| @@ -45,7 +45,7 @@ | ||
| 45 | 45 | |
| 46 | 46 | public function getCMSFields() | 
| 47 | 47 |      { | 
| 48 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 48 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 49 | 49 | $fields->addFieldToTab( | 
| 50 | 50 | 'Root.Main', | 
| 51 | 51 |                  TextField::create('Author', $this->fieldLabel('Author')), | 
| @@ -159,7 +159,7 @@ discard block | ||
| 159 | 159 | } | 
| 160 | 160 | |
| 161 | 161 |          if (isset($tag)) { | 
| 162 | - $tag = (int)$tag; | |
| 162 | + $tag = (int) $tag; | |
| 163 | 163 | } | 
| 164 | 164 |          if (isset($from)) { | 
| 165 | 165 | $from = urldecode($from); | 
| @@ -174,10 +174,10 @@ discard block | ||
| 174 | 174 |              $to = $parser->Format('y-MM-dd'); | 
| 175 | 175 | } | 
| 176 | 176 |          if (isset($year)) { | 
| 177 | - $year = (int)$year; | |
| 177 | + $year = (int) $year; | |
| 178 | 178 | } | 
| 179 | 179 |          if (isset($month)) { | 
| 180 | - $month = (int)$month; | |
| 180 | + $month = (int) $month; | |
| 181 | 181 | } | 
| 182 | 182 | |
| 183 | 183 | // If only "To" has been provided filter by single date. Normalise by swapping with "From". | 
| @@ -259,7 +259,7 @@ discard block | ||
| 259 | 259 |          $tagID = $this->request->getVar('tag'); | 
| 260 | 260 | |
| 261 | 261 |          if (isset($tagID)) { | 
| 262 | - return TaxonomyTerm::get_by_id(TaxonomyTerm::class, (int)$tagID); | |
| 262 | + return TaxonomyTerm::get_by_id(TaxonomyTerm::class, (int) $tagID); | |
| 263 | 263 | } | 
| 264 | 264 | } | 
| 265 | 265 | |
| @@ -186,7 +186,7 @@ | ||
| 186 | 186 | |
| 187 | 187 | public function getCMSFields() | 
| 188 | 188 |      { | 
| 189 | -        $this->beforeUpdateCMSFields(function (FieldList $fields) { | |
| 189 | +        $this->beforeUpdateCMSFields(function(FieldList $fields) { | |
| 190 | 190 | // Related Pages | 
| 191 | 191 | $components = GridFieldConfig_RelationEditor::create(); | 
| 192 | 192 | $components->removeComponentsByType(GridFieldAddNewButton::class); | 
| @@ -52,7 +52,7 @@ | ||
| 52 | 52 | $records = []; | 
| 53 | 53 | |
| 54 | 54 | // Get the query to apply across all variants: looks at all subsites, translations, live stage only. | 
| 55 | -        $crossVariant = (function ($dataQuery) { | |
| 55 | +        $crossVariant = (function($dataQuery) { | |
| 56 | 56 | $params = [ | 
| 57 | 57 | 'Subsite.filter' => false, | 
| 58 | 58 | 'Versioned.mode' => 'stage', |