Craft\NeoFieldType::getStaticHtml PHP Method

getStaticHtml() public method

Builds the HTML for the non-editable input field.
public getStaticHtml ( array $value ) : string
$value array
return string
    public function getStaticHtml($value)
    {
        if ($value) {
            $settings = $this->getSettings();
            $field = $settings->getField();
            $translatable = $field ? (bool) $field->translatable : false;
            $id = StringHelper::randomString();
            $html = craft()->templates->render('neo/_fieldtype/input', ['id' => $id, 'name' => $id, 'field' => $field, 'blockTypes' => $settings->getBlockTypes(), 'blocks' => $value, 'static' => true, 'translatable' => $translatable]);
            $this->_prepareInputHtml($id, $id, $settings, $value, true);
            return $html;
        } else {
            return '<p class="light">' . Craft::t("No blocks.") . '</p>';
        }
    }