Guest
Public paste!

Solar_Form::setElelementProperty

By: a guest | Jun 10th, 2010 | Syntax: PHP | Size: 0.66 KB | Hits: 133 | Expires: Never
Copy text to clipboard
  1.     /**
  2.      *
  3.      * Sets the property of one element.
  4.      *
  5.      * @param string $name The element name.
  6.      *
  7.      * @param string $property_name The element property name
  8.      *
  9.      * @param string $property_value The element property value
  10.      *
  11.      * @param string $array Rename the element as a key in this array.
  12.      *
  13.      * @return void
  14.      *
  15.      */
  16.     public function setElementProperty($name, $property_name, $property_value, $array = null)
  17.     {
  18.         $name = $this->_prepareName($name, $array);
  19.         if (! empty($this->elements[$name])) {
  20.             $this->elements[$name][$property_name] = $property_value;
  21.         }
  22.     }