PHP Class Bootstrapper\MediaObject

Inheritance: extends bootstrapper\RenderedObject
Afficher le fichier Open project: patricktalmadge/bootstrapper Class Usage Examples

Protected Properties

Свойство Type Description
$contents The contents of the media object
$list Whether the list

Méthodes publiques

Méthode Description
asList ( ) Force the media object to become a list
render ( ) : string Renders the media object
withContents ( array $contents ) Sets the contents of the media object

Méthodes protégées

Méthode Description
getBody ( array $contents ) : string Get the body of the contents array
getHeading ( array $contents ) : string Get the heading of the media object
getImage ( array $contents, string $alt ) : string Get the image of the media object
getLink ( array $contents, string $image, string $position ) : string Turn the image into a link/div
getPosition ( array $contents ) : string Get the position
renderItem ( array $contents, string $tag ) : string Renders an item in the string
renderList ( ) : string Renders a list

Method Details

asList() public méthode

Force the media object to become a list
public asList ( )

getBody() protected méthode

Get the body of the contents array
protected getBody ( array $contents ) : string
$contents array
Résultat string

getHeading() protected méthode

Get the heading of the media object
protected getHeading ( array $contents ) : string
$contents array
Résultat string

getImage() protected méthode

Get the image of the media object
protected getImage ( array $contents, string $alt ) : string
$contents array
$alt string The alt text of the image
Résultat string

getPosition() protected méthode

Get the position
protected getPosition ( array $contents ) : string
$contents array
Résultat string pull-right if the position key equals right. pull-left otherwise

render() public méthode

Renders the media object
public render ( ) : string
Résultat string

renderItem() protected méthode

Renders an item in the string
protected renderItem ( array $contents, string $tag ) : string
$contents array
$tag string The tag to wrap the item in
Résultat string

renderList() protected méthode

Renders a list
protected renderList ( ) : string
Résultat string

withContents() public méthode

Sets the contents of the media object
public withContents ( array $contents )
$contents array The contents of the media object

Property Details

$contents protected_oe property

The contents of the media object
protected $contents

$list protected_oe property

Whether the list
protected $list