\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 = ;
- // methods
- public void doPublish()
- public void doDeleteFromStage()
- 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
- DataObject
Members
private
- $condition_options
- $db
- $extensions
—
array
Built in extensions required - $has_one
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()
- doDeleteFromStage() — Delete this custom rule from a given stage
- doPublish() — Publish this custom rule to the live site
- 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.