\VideoBlock
Block that shows a video from an external source (YouTube, Vimeo)
- Author: bummzack
Synopsis
class VideoBlock
extends Block
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $aspect_ratios = ;
- private static string $player_color = '44BBFF';
- // methods
- public void getCMSFields()
- public void updateOEmbedThumbnail()
- public false|Oembed_Result Media()
- public number MediaHeightRatio()
- protected void onBeforeWrite()
- // Inherited methods from Block
- public void getCMSFields()
- public string PublishedStatus()
- public boolean IsPublished()
- public void canCreate()
- public string CSSClass()
- public HTMLText HTML()
- public string FullTitle()
- public string getCMSTitle()
- protected bool isSortingChanged()
- protected void onBeforeWrite()
Hierarchy
Extends
Members
private
- $aspect_ratios
—
array
Aspect ratios to use for manual ratio dropdown. - $db
- $has_one
- $player_color
—
string
Color to customize the vimeo player.
Methods
protected
public
- Media() — Get the embedded media
- MediaHeightRatio() — The ratio of the height compared to the width
- getCMSFields()
- updateOEmbedThumbnail() — Fetch and update the media thumbnail
Inherited from Block
protected
- isSortingChanged() — Whether or not sorting of this block has changed.
- onBeforeWrite()
public
- CSSClass() — Class name to use in CSS
- FullTitle() — Get the full title of this block, including title of the parent (eg. the Page it belongs to)
- HTML() — Render this block to HTML
- IsPublished() — Whether or not this block has been published
- PublishedStatus() — Get the current published status.
- canCreate() — Prevent creation of non-specific Blocks
- getCMSFields()
- getCMSTitle() — Get the title to show in the CMS