Ejemplo n.º 1
0
 /**
  * Returns the element value
  *
  * @return mixed
  */
 public function getValue()
 {
     $name = $this->_name;
     $value = null;
     /**
      * Get the related form
      */
     $form = $this->_form;
     if (is_object($form)) {
         /**
          * Gets the possible value for the widget
          */
         $value = $form->getValue($name);
         /**
          * Check if the tag has a default value
          */
         if (is_null($value) && Tag::hasValue($name)) {
             $value = Tag::getValue($name);
         }
     }
     /**
      * Assign the default value if there is no form available
      */
     if (is_null($value)) {
         $value = $this->_value;
     }
     return $value;
 }