\ContentImageBlock
- Author: Donatas Navidonskis <donatas@navidonskis.com>
Synopsis
class ContentImageBlock
extends BaseBlock
{
- // members
- private static array $db = ;
- private static array $many_many = ;
- private static array $many_many_extraFields = ;
- // Inherited members from BaseBlock
- protected static string $upload_directory;
- // methods
- public string singular_name()
- public string plural_name()
- public array|string getTemplateTypes()
- public string getTemplateType()
- public FieldList getCMSFields()
- public array fieldLabels()
- protected array getTemplateOptions()
- public HTMLText forTemplate()
- public Image getFirstImage()
- // Inherited methods from BaseBlock
- public HTMLText isPublishedIcon()
- public string forTemplate()
- public bool|string Link()
- public string getUploadDirectory()
- public string getBlockName()
Hierarchy
Extends
Members
private
- $db — array
- $many_many — array
- $many_many_extraFields — array
protected
- $upload_directory
—
string
Default directory to upload your files.
Methods
protected
public
- fieldLabels()
- forTemplate()
- getCMSFields()
- getFirstImage()
- getTemplateType() — Get current template type as lowercase and dashed string.
- getTemplateTypes() — Get template types as lowercase and dashed string.
- 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 BaseBlock
public
- Link()
- forTemplate() — Renders this block with appropriate templates looks for templates that match BlockClassName_AreaName falls back to BlockClassName.
- getBlockName()
- getUploadDirectory()
- isPublishedIcon() — Re-add (un)publish images.