src/View/AbstractRender.php
protected function renderHelp(Model $model)
    {
        $data = $model->getJson();

        // Test if we have anything to display at all.
        if (empty($data) === true) {
            return '';
        }

        // We have at least something to display here.
        $helpRow = $this->getTemplateFileContent(static::FILE_HELPROW);
        $helpContent = '';

        // Add the stuff from the json after the help text, if any.
        foreach ($data as $title => $text) {
            $helpContent .= str_replace(
                array(static::MARKER_HELP_TITLE, static::MARKER_HELP_TEXT),
                array($title, $text),
                $helpRow
            );
        }

        // Add it into the wrapper.
        return str_replace(static::MARKER_HELP, $helpContent, $this->getTemplateFileContent(static::FILE_HELP));
    }
protected function renderHelp(Model $model)
    {
        $data = $model->getJson();

        // Test if we have anything to display at all.
        if (empty($data) === true) {
            return '';
        }

        // We have at least something to display here.
        $helpRow = $this->getTemplateFileContent(static::FILE_HELPROW);
        $helpContent = '';

        // Add the stuff from the json after the help text, if any.
        foreach ($data as $title => $text) {
            $helpContent .= str_replace(
                array(static::MARKER_HELP_TITLE, static::MARKER_HELP_TEXT),
                array($title, $text),
                $helpRow
            );
        }

        // Add it into the wrapper.
        return str_replace(static::MARKER_HELP, $helpContent, $this->getTemplateFileContent(static::FILE_HELP));
    }
protected function renderHelp ( Model $ model ) { $ data = $ model -> getJson ( ) ; // Test if we have anything to display at all. if ( empty ( $ data ) === true ) { return '' ; } // We have at least something to display here. $ helpRow = $ this -> getTemplateFileContent ( static :: FILE_HELPROW ) ; $ helpContent = '' ; // Add the stuff from the json after the help text, if any. foreach ( $ data as $ title => $ text ) { $ helpContent .= str_replace ( array ( static :: MARKER_HELP_TITLE , static :: MARKER_HELP_TEXT ) , array ( $ title , $ text ) , $ helpRow ) ; } // Add it into the wrapper. return str_replace ( static :: MARKER_HELP , $ helpContent , $ this -> getTemplateFileContent ( static :: FILE_HELP ) ) ; }
Renders the helptext.

@param Model $model
The ID of the helptext.

@see Usage

@return string
The generated markup from the template files.
Renders the helptext .