Last active
February 11, 2016 00:27
-
-
Save rotassator/46ccdf30bb5b5a7883ac to your computer and use it in GitHub Desktop.
SilverStripe: make fields read-only on admin content tab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// make main tab fields read-only | |
$main_fields = $fields->fieldByName('Root.Main')->Fields(); | |
foreach ($main_fields as $field) { | |
$main_fields->push($field->performReadonlyTransformation()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment