FluidTYPO3\Flux\Form::getDescription PHP Method

getDescription() public method

public getDescription ( ) : string
return string
    public function getDescription()
    {
        $description = $this->description;
        $translated = NULL;
        $extensionKey = ExtensionNamingUtility::getExtensionKey($this->extensionName);
        if (TRUE === empty($description)) {
            $relativeFilePath = $this->getLocalLanguageFileRelativePath();
            $relativeFilePath = ltrim($relativeFilePath, '/');
            $filePrefix = 'LLL:EXT:' . $extensionKey . '/' . $relativeFilePath;
            $description = $filePrefix . ':' . trim('flux.' . $this->id . '.description');
        }
        return $description;
    }

Usage Example

    /**
     * Builds a single Wizard item (one FCE) based on the
     * tab id, element id, configuration array and special
     * template identity (groupName:Relative/Path/File.html)
     *
     * @param string $tabId
     * @param string $id
     * @param \FluidTYPO3\Flux\Form $form
     * @param string $templateFileIdentity
     * @return string
     */
    protected function buildWizardTabItem($tabId, $id, $form, $templateFileIdentity)
    {
        $icon = $form->getOption(Form::OPTION_ICON);
        $description = $form->getDescription();
        if (TRUE === empty($description)) {
            $description = '-';
        }
        $iconFileRelativePath = $icon ? $icon : $this->defaultIcon;
        return sprintf('
			mod.wizards.newContentElement.wizardItems.%s.elements.%s {
				icon = %s
				title = %s
				description = %s
				tt_content_defValues {
					CType = fluidcontent_content
					tx_fed_fcefile = %s
				}
			}
			', $tabId, $id, $iconFileRelativePath, $form->getLabel(), $description, $templateFileIdentity);
    }