/** * Setup and return needed attribute as array * @return Array Data array */ protected function _setup_data() { // Set Basic Data $this->add_data('name', $this->get_name()); $this->add_data('default', $this->get_default()); $this->add_data('value', $this->get_value()); // Determine Type $type = 'vp-' . strtolower(substr(get_class($this), strrpos(get_class($this), '_') + 1)); // Is hidden if ($this->is_hidden()) { $this->add_container_extra_classes('vp-hide'); } // Set Control Head Data $this->add_data('head_info', array('name' => $this->get_name(), 'type' => $type, 'container_extra_classes' => implode(' ', $this->get_container_extra_classes()), 'is_hidden' => $this->is_hidden(), 'validation' => $this->get_validation(), 'dependency' => $this->get_dependency(), 'binding' => $this->get_binding(), 'label' => $this->get_label(), 'description' => VP_Util_Text::parse_md($this->get_description()))); }