public static function media($image, $heading, $content, $htmlOptions = array())
    {
        $tag = TbArray::popValue('tag', $htmlOptions, 'div');
        self::addCssClass('media', $htmlOptions);
        $linkOptions = TbArray::popValue('linkOptions', $htmlOptions, array());
        TbArray::defaultValue('pull', self::PULL_LEFT, $linkOptions);
        $imageOptions = TbArray::popValue('imageOptions', $htmlOptions, array());
        self::addCssClass('media-object', $imageOptions);
        $contentOptions = TbArray::popValue('contentOptions', $htmlOptions, array());
        self::addCssClass('media-body', $contentOptions);
        $headingOptions = TbArray::popValue('headingOptions', $htmlOptions, array());
        self::addCssClass('media-heading', $headingOptions);
        $items = TbArray::popValue('items', $htmlOptions);

        $output = self::openTag($tag, $htmlOptions);
        $alt = TbArray::popValue('alt', $imageOptions, '');
        $href = TbArray::popValue('href', $linkOptions, '#');
        if (!empty($image)) {
            $output .= self::link(parent::image($image, $alt, $imageOptions), $href, $linkOptions);
        }
        $output .= self::openTag('div', $contentOptions);
        $output .= self::tag('h4', $headingOptions, $heading);
        $output .= $content;
        if (!empty($items)) {
            $output .= self::medias($items);
        }
        $output .= '</div>';
        $output .= self::closeTag($tag);
        return $output;
    }
public static function media($image, $heading, $content, $htmlOptions = array())
    {
        $tag = TbArray::popValue('tag', $htmlOptions, 'div');
        self::addCssClass('media', $htmlOptions);
        $linkOptions = TbArray::popValue('linkOptions', $htmlOptions, array());
        TbArray::defaultValue('pull', self::PULL_LEFT, $linkOptions);
        $imageOptions = TbArray::popValue('imageOptions', $htmlOptions, array());
        self::addCssClass('media-object', $imageOptions);
        $contentOptions = TbArray::popValue('contentOptions', $htmlOptions, array());
        self::addCssClass('media-body', $contentOptions);
        $headingOptions = TbArray::popValue('headingOptions', $htmlOptions, array());
        self::addCssClass('media-heading', $headingOptions);
        $items = TbArray::popValue('items', $htmlOptions);

        $output = self::openTag($tag, $htmlOptions);
        $alt = TbArray::popValue('alt', $imageOptions, '');
        $href = TbArray::popValue('href', $linkOptions, '#');
        if (!empty($image)) {
            $output .= self::link(parent::image($image, $alt, $imageOptions), $href, $linkOptions);
        }
        $output .= self::openTag('div', $contentOptions);
        $output .= self::tag('h4', $headingOptions, $heading);
        $output .= $content;
        if (!empty($items)) {
            $output .= self::medias($items);
        }
        $output .= '</div>';
        $output .= self::closeTag($tag);
        return $output;
    }
public static function media ( $ image , $ heading , $ content , $ htmlOptions = array ( ) ) { $ tag = TbArray :: popValue ( 'tag' , $ htmlOptions , 'div' ) ; self :: addCssClass ( 'media' , $ htmlOptions ) ; $ linkOptions = TbArray :: popValue ( 'linkOptions' , $ htmlOptions , array ( ) ) ; TbArray :: defaultValue ( 'pull' , self :: PULL_LEFT , $ linkOptions ) ; $ imageOptions = TbArray :: popValue ( 'imageOptions' , $ htmlOptions , array ( ) ) ; self :: addCssClass ( 'media-object' , $ imageOptions ) ; $ contentOptions = TbArray :: popValue ( 'contentOptions' , $ htmlOptions , array ( ) ) ; self :: addCssClass ( 'media-body' , $ contentOptions ) ; $ headingOptions = TbArray :: popValue ( 'headingOptions' , $ htmlOptions , array ( ) ) ; self :: addCssClass ( 'media-heading' , $ headingOptions ) ; $ items = TbArray :: popValue ( 'items' , $ htmlOptions ) ; $ output = self :: openTag ( $ tag , $ htmlOptions ) ; $ alt = TbArray :: popValue ( 'alt' , $ imageOptions , '' ) ; $ href = TbArray :: popValue ( 'href' , $ linkOptions , '#' ) ; if ( ! empty ( $ image ) ) { $ output .= self :: link ( parent :: image ( $ image , $ alt , $ imageOptions ) , $ href , $ linkOptions ) ; } $ output .= self :: openTag ( 'div' , $ contentOptions ) ; $ output .= self :: tag ( 'h4' , $ headingOptions , $ heading ) ; $ output .= $ content ; if ( ! empty ( $ items ) ) { $ output .= self :: medias ( $ items ) ; } $ output .= '</div>' ; $ output .= self :: closeTag ( $ tag ) ; return $ output ; }
Generates a single media object.
@param string $image the image url.
@param string $heading the heading text.
@param string $content the content text.
@param array $htmlOptions additional HTML attributes.
@return string the media object.
Generates a single media object .