. */ use Joomla\CMS\Form\FormField; defined('_JEXEC') or die(); /** * Class ShackFormFieldBase * * @property bool $fromInstaller */ class ShackFormFieldBase extends FormField { /** * @var bool */ protected $fromInstaller = false; public function __set($name, $value = null) { switch ($name) { case 'fromInstaller': $this->fromInstaller = (bool)$value; break; default: parent::__set($name, $value); } } /** * @inheritDoc */ protected function getInput() { return ''; } /** * @param ?string $path * * @return string */ protected function getStyle(?string $path): string { if ($path && is_file($path)) { return ''; } return ''; } /** * @inheritDoc */ protected function getLabel() { return ''; } /** * @param SimpleXMLElement $element * * @return ?string */ public function getInputUsingCustomElement(SimpleXMLElement $element): ?string { $this->element = $element; $this->setup($element, null); return $this->getInput(); } }