Пример #1
0
 /**
  * Method to get the field options.
  *
  * @return	array	The field option objects.
  * @since	1.6
  */
 protected function getOptions()
 {
     // Initialize variables.
     $options = array();
     // Initialize some field attributes.
     $first = (int) $this->element['first'];
     $last = (int) $this->element['last'];
     $step = (int) $this->element['step'];
     // Sanity checks.
     if ($step == 0) {
         // Step of 0 will create an endless loop.
         return $options;
     } else {
         if ($first < $last && $step < 0) {
             // A negative step will never reach the last number.
             return $options;
         } else {
             if ($first > $last && $step > 0) {
                 // A position step will never reach the last number.
                 return $options;
             }
         }
     }
     // Build the options array.
     for ($i = $first; $i <= $last; $i += $step) {
         $options[] = RokCommon_Config_HTML_Select::option($i);
     }
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
Пример #2
0
 /**
  * Method to get the field options.
  *
  * @return    array    The field option objects.
  * @since    1.6
  */
 protected function getOptions()
 {
     global $gantry;
     $options = array();
     $options = parent::getOptions();
     $choices = array("linear", "Quad.easeOut", "Quad.easeIn", "Quad.easeInOut", "Cubic.easeOut", "Cubic.easeIn", "Cubic.easeInOut", "Quart.easeOut", "Quart.easeIn", "Quart.easeInOut", "Quint.easeOut", "Quint.easeIn", "Quint.easeInOut", "Expo.easeOut", "Expo.easeIn", "Expo.easeInOut", "Circ.easeOut", "Circ.easeIn", "Circ.easeInOut", "Sine.easeOut", "Sine.easeIn", "Sine.easeInOut", "Back.easeOut", "Back.easeIn", "Back.easeInOut", "Bounce.easeOut", "Bounce.easeIn", "Bounce.easeInOut", "Elastic.easeOut", "Elastic.easeIn", "Elastic.easeInOut");
     foreach ($choices as $choice) {
         // Create a new option object based on the <option /> element.
         $tmp = RokCommon_Config_HTML_Select::option($choice, $choice, 'value', 'text', false);
         $options[] = $tmp;
     }
     return $options;
 }