SilverStripe\UserForms\Model\EditableCustomRule
A custom rule for showing / hiding an EditableFormField based the value of another EditableFormField.
Synopsis
class EditableCustomRule
extends DataObject
{
- // members
- private static array $condition_options = ;
- private static array $db = ;
- private static array $has_one = ;
- private static array $extensions = ;
- private static string $table_name = 'EditableCustomRule';
- // methods
- public bool canDelete()
- public bool canEdit()
- public bool canView()
- public bool canCreate()
- protected DataObject getCanCreateContext()
- public bool canPublish()
- public bool canUnpublish()
- public array buildExpression()
- public string toggleDisplayText()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $condition_options
- $db
- $extensions
—
array
Built in extensions required - $has_one
- $table_name
Methods
protected
- getCanCreateContext() — Helper method to check the parent for this object
public
- buildExpression() — Substitutes configured rule logic with it's JS equivalents and returns them as array elements
- canCreate() — Return whether a user can create an object of this type
- canDelete()
- canEdit()
- canPublish()
- canUnpublish()
- canView()
- toggleDisplayText() — Returns the opposite visibility function for the value of the initial visibility field, e.g. show/hide. This will toggle the "hide" class either way, which is handled by CSS.