@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | * Can a user view this SiteConfig instance? |
| 278 | 278 | * |
| 279 | 279 | * @param Member $member |
| 280 | - * @return boolean |
|
| 280 | + * @return boolean|string |
|
| 281 | 281 | */ |
| 282 | 282 | public function canView($member = null) |
| 283 | 283 | { |
@@ -372,6 +372,9 @@ discard block |
||
| 372 | 372 | return false; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | + /** |
|
| 376 | + * @param Member $member |
|
| 377 | + */ |
|
| 375 | 378 | public function canEdit($member = null) |
| 376 | 379 | { |
| 377 | 380 | if (!$member) { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function getCMSFields() |
| 86 | 86 | { |
| 87 | - $mapFn = function ($groups = []) { |
|
| 87 | + $mapFn = function($groups = []) { |
|
| 88 | 88 | $map = []; |
| 89 | 89 | foreach ($groups as $group) { |
| 90 | 90 | // Listboxfield values are escaped, use ASCII char instead of » |
@@ -173,15 +173,15 @@ discard block |
||
| 173 | 173 | $fields->makeFieldReadonly($titleField); |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - if (file_exists(BASE_PATH . '/install.php')) { |
|
| 176 | + if (file_exists(BASE_PATH.'/install.php')) { |
|
| 177 | 177 | $fields->addFieldToTab( |
| 178 | 178 | "Root.Main", |
| 179 | 179 | new LiteralField( |
| 180 | 180 | "InstallWarningHeader", |
| 181 | - "<p class=\"message warning\">" . _t( |
|
| 181 | + "<p class=\"message warning\">"._t( |
|
| 182 | 182 | "SilverStripe\\CMS\\Model\\SiteTree.REMOVE_INSTALL_WARNING", |
| 183 | 183 | "Warning: You should remove install.php from this SilverStripe install for security reasons." |
| 184 | - ) . "</p>" |
|
| 184 | + )."</p>" |
|
| 185 | 185 | ), |
| 186 | 186 | "Title" |
| 187 | 187 | ); |
@@ -139,7 +139,7 @@ |
||
| 139 | 139 | * |
| 140 | 140 | * @param array $data |
| 141 | 141 | * @param Form $form |
| 142 | - * @return String |
|
| 142 | + * @return \SilverStripe\ORM\FieldType\DBHTMLText |
|
| 143 | 143 | */ |
| 144 | 144 | public function save_siteconfig($data, $form) |
| 145 | 145 | { |
@@ -99,12 +99,12 @@ |
||
| 99 | 99 | $actions, |
| 100 | 100 | $validator |
| 101 | 101 | )->setHTMLID('Form_EditForm'); |
| 102 | - $form->setValidationResponseCallback(function (ValidationResult $errors) use ($negotiator, $form) { |
|
| 102 | + $form->setValidationResponseCallback(function(ValidationResult $errors) use ($negotiator, $form) { |
|
| 103 | 103 | $request = $this->getRequest(); |
| 104 | 104 | if ($request->isAjax() && $negotiator) { |
| 105 | 105 | $result = $form->forTemplate(); |
| 106 | 106 | return $negotiator->respond($request, array( |
| 107 | - 'CurrentForm' => function () use ($result) { |
|
| 107 | + 'CurrentForm' => function() use ($result) { |
|
| 108 | 108 | return $result; |
| 109 | 109 | } |
| 110 | 110 | )); |
@@ -4,6 +4,6 @@ |
||
| 4 | 4 | define('BASE_PATH', getcwd()); |
| 5 | 5 | } |
| 6 | 6 | |
| 7 | -require_once BASE_PATH . '/cms/tests/bootstrap/mysite.php'; |
|
| 7 | +require_once BASE_PATH.'/cms/tests/bootstrap/mysite.php'; |
|
| 8 | 8 | |
| 9 | -copy(__DIR__ . '/fixtures/theme.yml.fixture', $projectPath . '/_config/dummytheme.yml'); |
|
| 9 | +copy(__DIR__.'/fixtures/theme.yml.fixture', $projectPath.'/_config/dummytheme.yml'); |
|