Bootstrapper\MediaObject::render PHP Method

render() public method

Renders the media object
public render ( ) : string
return string
    public function render()
    {
        if ($this->list) {
            return $this->renderList();
        }
        if (!$this->contents) {
            throw new MediaObjectException("You need to give the object some contents");
        }
        return $this->renderItem($this->contents, 'div');
    }

Usage Example

Example #1
0
 /**
  * Renders the media object
  *
  * @return string 
  * @throws MediaObjectException if there is no contents
  * @static 
  */
 public static function render()
 {
     return \Bootstrapper\MediaObject::render();
 }