registerArgument('label', 'string', 'select field label'); $this->registerArgument('name', 'string', 'select name attribute'); $this->registerArgument('id', 'string', 'id attribute select field'); $this->registerArgument('options', 'array', 'Associative array with keys as integers and values as string'); $this->registerArgument('required', 'boolean'); } /** * @return string */ public function render() { $output = ''; if(isset($this->argument['label']) && $this->argument['label']) { $label = $this->argument['label']; $output .= ''; } if(isset($this->argument['name']) && $this->argument['name']) { $this->tag->addAttribute($this->argument['name']); } if(isset($this->argument['id']) && $this->argument['id']) { $this->tag->addAttribute($this->argument['id']); } if(isset($this->argument['required']) && $this->argument['required']) { $this->tag->addAttribute($this->argument['required']); } if(isset($this->argument['options']) && $this->argument['options']) { if(is_array($this->argument['options'])) { $options = $this->argument['options']; foreach($options as $k => $value) { $output .= ''; } } } $this->tag->forceClosingTag(true); return $output; } }