* @copyright 2020 Copyright XEHub Corp. * @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL * @link https://xpressengine.io */ namespace App\UIObjects\Form; use Xpressengine\UIObject\AbstractUIObject; /** * Class FormLangText * * @category UIObjects * @package App\UIObjects\Form * @author XE Developers * @copyright 2020 Copyright XEHub Corp. * @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL * @link https://xpressengine.io */ class FormLangText extends AbstractUIObject { /** * The component id * * @var string */ protected static $id = 'uiobject/xpressengine@formLangText'; /** * Get the evaluated contents of the object. * * @return string */ public function render() { $args = $this->arguments; $value = array_get($args, 'value'); if($value !== null) { array_set($args, 'langKey', $value); } $label = array_get($args, 'label', ''); if($label) { $label = ''; } $content = uio('langText', $args); $description = array_get($args, 'description'); return sprintf('
%s %s

%s

', $label, $content, $description); } }