Overview

Namespaces

  • Charcoal
    • Ui
      • Dashboard
      • Form
      • FormGroup
      • FormInput
      • Layout
      • Menu
      • MenuItem
      • ServiceProvider

Classes

  • AbstractUiItem
  • UiItemConfig

Interfaces

  • UiGroupingInterface
  • UiItemInterface

Traits

  • UiGroupingTrait
  • UiItemTrait
  • Overview
  • Namespace
  • Class

Trait UiItemTrait

Provides an implementation of Charcoal\Ui\UiItemInterface.

Direct Known Users

Charcoal\Ui\AbstractUiItem

Indirect Known Users

Charcoal\Ui\Dashboard\AbstractDashboard, Charcoal\Ui\Dashboard\GenericDashboard, Charcoal\Ui\MenuItem\AbstractMenuItem, Charcoal\Ui\MenuItem\GenericMenuItem, Charcoal\Ui\Form\AbstractForm, Charcoal\Ui\Form\GenericForm, Charcoal\Ui\FormGroup\AbstractFormGroup, Charcoal\Ui\FormGroup\GenericFormGroup, Charcoal\Ui\FormInput\AbstractFormInput, Charcoal\Ui\FormInput\GenericFormInput, Charcoal\Ui\Menu\AbstractMenu, Charcoal\Ui\Menu\GenericMenu
Namespace: Charcoal\Ui
Located at Charcoal/Ui/UiItemTrait.php
Methods summary
public Charcoal\Ui\UiItemInterface
# setType( string|null $type )

Set the UI item type.

Set the UI item type.

Parameters

$type
The UI item type.

Returns

Charcoal\Ui\UiItemInterface
Chainable

Throws

InvalidArgumentException
If the type is not a string.
public string
# type( )

Retrieve the UI item type.

Retrieve the UI item type.

Returns

string
public Charcoal\Ui\UiItemInterface
# setTemplate( string $template )

Set the UI item's template.

Set the UI item's template.

Usually, a path to a file containing the template to be rendered.

Parameters

$template
A template (identifier).

Returns

Charcoal\Ui\UiItemInterface
Chainable

Throws

InvalidArgumentException
If the template is not a string.
public string
# template( )

Retrieve the UI item's template.

Retrieve the UI item's template.

Returns

string
If unset, returns the UI item type.
public Charcoal\Ui\UiItemInterface
# setTitle( mixed $title )

Set the UI item's title.

Set the UI item's title.

Parameters

$title
A title.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public Charcoal\Translator\Translation|null
# title( )

Retrieve the title.

Retrieve the title.

Returns

Charcoal\Translator\Translation|null
public Charcoal\Ui\UiItemInterface
# setSubtitle( mixed $subtitle )

Set the UI item's sub-title.

Set the UI item's sub-title.

Parameters

$subtitle
A sub-title.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public Charcoal\Translator\Translation|null
# subtitle( )

Retrieve the sub-title.

Retrieve the sub-title.

Returns

Charcoal\Translator\Translation|null
public Charcoal\Ui\UiItemInterface
# setDescription( mixed $description )

Set the UI item's description.

Set the UI item's description.

Parameters

$description
A description.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public Charcoal\Translator\Translation|null
# description( )

Retrieve the description.

Retrieve the description.

Returns

Charcoal\Translator\Translation|null
public Charcoal\Ui\UiItemInterface
# setNotes( mixed $notes )

Set notes about the UI item.

Set notes about the UI item.

Parameters

$notes
Notes.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public Charcoal\Translator\Translation|null
# notes( )

Retrieve the notes.

Retrieve the notes.

Returns

Charcoal\Translator\Translation|null
public Charcoal\Ui\UiItemInterface
# setShowTitle( boolean $show )

Show/hide the UI item's title.

Show/hide the UI item's title.

Parameters

$show
Show (TRUE) or hide (FALSE) the title.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public boolean
# showTitle( )

Determine if the title is to be displayed.

Determine if the title is to be displayed.

Returns

boolean
If TRUE or unset, check if there is a title.
public Charcoal\Ui\UiItemInterface
# setShowSubtitle( boolean $show )

Show/hide the UI item's sub-title.

Show/hide the UI item's sub-title.

Parameters

$show
Show (TRUE) or hide (FALSE) the sub-title.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public boolean
# showSubtitle( )

Determine if the sub-title is to be displayed.

Determine if the sub-title is to be displayed.

Returns

boolean
If TRUE or unset, check if there is a sub-title.
public Charcoal\Ui\UiItemInterface
# setShowDescription( boolean $show )

Show/hide the UI item's description.

Show/hide the UI item's description.

Parameters

$show
Show (TRUE) or hide (FALSE) the description.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public boolean
# showDescription( )

Determine if the description is to be displayed.

Determine if the description is to be displayed.

Returns

boolean
If TRUE or unset, check if there is a description.
public Charcoal\Ui\UiItemInterface
# setShowNotes( boolean $show )

Show/hide the UI item's notes.

Show/hide the UI item's notes.

Parameters

$show
Show (TRUE) or hide (FALSE) the notes.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public boolean
# showNotes( )

Determine if the notes is to be displayed.

Determine if the notes is to be displayed.

Returns

boolean
If TRUE or unset, check if there are notes.
public Charcoal\Ui\UiItemInterface
# setShowHeader( boolean $show )

Show/hide the UI item's header.

Show/hide the UI item's header.

Parameters

$show
Show (TRUE) or hide (FALSE) the header.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public boolean
# showHeader( )

Determine if the header is to be displayed.

Determine if the header is to be displayed.

Returns

boolean
If TRUE or unset, check if there is a title.
public Charcoal\Ui\UiItemInterface
# setShowFooter( boolean $show )

Show/hide the UI item's footer.

Show/hide the UI item's footer.

Parameters

$show
Show (TRUE) or hide (FALSE) the footer.

Returns

Charcoal\Ui\UiItemInterface
Chainable
public boolean
# showFooter( )

Determine if the footer is to be displayed.

Determine if the footer is to be displayed.

Returns

boolean
If TRUE or unset, check if there are notes.
public string
# icon( )

Retrieve the path to the item's icon.

Retrieve the path to the item's icon.

Returns

string
public Charcoal\Ui\UiItemInterface
# setIcon( string $icon )

Set the path to the item's icon associated with the object.

Set the path to the item's icon associated with the object.

Parameters

$icon
A path to an image.

Returns

Charcoal\Ui\UiItemInterface
Chainable
abstract protected Charcoal\Translator\Translator
# translator( )

Returns

Charcoal\Translator\Translator
API documentation generated by ApiGen