SheaDawson\Blocks\Model\ContentBlock
Synopsis
class ContentBlock
extends Block
{
- // members
- private static string $table_name = "ContentBlock";
- private static array $db = ;
- // Inherited members from Block
- public BlockManager $blockManager;
- protected BlockController $controller;
- // methods
- public string singular_name()
- public string plural_name()
- public void fieldLabels()
- // Inherited methods from Block
- public void fieldLabels()
- public void getDefaultSearchContext()
- public mixed getTypeForGridfield()
- public void getCMSFields()
- public string forTemplate()
- public string BlockHTML()
- public void onAfterDelete()
- public void onAfterDuplicate()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void canCreate()
- public void canPublish()
- public void providePermissions()
- public void onAfterWrite()
- public void pagesAffectedByChanges()
- public void UsageListAsString()
- public bool isPublished()
- public bool isPublishedNice()
- public DBHTMLText isPublishedIcon()
- public string CSSClasses()
- public Controller getCurrentPage()
- public BlockController getController()
Hierarchy
Extends
Members
private
- $db
- $table_name
protected
- $controller — SheaDawson\Blocks\Model\BlockController
public
- $blockManager — SheaDawson\Blocks\BlockManager
Methods
public
- fieldLabels()
- plural_name() — If the plural name is set in a private static $plural_name, it cannot be changed using the translation files for some reason. Fix it by defining a method that handles the translation.
- singular_name() — If the singular name is set in a private static $singular_name, it cannot be changed using the translation files for some reason. Fix it by defining a method that handles the translation.
Inherited from SheaDawson\Blocks\Model\Block
public
- BlockHTML()
- CSSClasses() — CSS Classes to apply to block element in template.
- UsageListAsString()
- canCreate()
- canDelete()
- canEdit()
- canPublish()
- canView()
- fieldLabels()
- forTemplate() — Renders this block with appropriate templates looks for templates that match BlockClassName_AreaName falls back to BlockClassName.
- getCMSFields()
- getController()
- getCurrentPage() — Access current page scope from Block templates with $CurrentPage
- getDefaultSearchContext()
- getTypeForGridfield()
- isPublished() — Check if this block has been published.
- isPublishedIcon()
- isPublishedNice() — Check if this block has been published.
- onAfterDelete()
- onAfterDuplicate() — Remove relations onAfterDuplicate.
- onAfterWrite()
- pagesAffectedByChanges() — Get a list of URL's to republish when this block changes if using StaticPublisher module.
- providePermissions()