/**
  * Client script to select/clear/check a drop down list, check box list,
  * or radio button list.
  * The second parameter determines the selection method. Valid methods are
  *  - <b>Value</b>, select or check by value
  *  - <b>Values</b>, select or check by a list of values
  *  - <b>Index</b>, select or check by index (zero based index)
  *  - <b>Indices</b>, select or check by a list of index (zero based index)
  *  - <b>Clear</b>, clears or selections or checks in the list
  *  - <b>All</b>, select all
  *  - <b>Invert</b>, invert the selection.
  * @param TControl list control
  * @param string selection method
  * @param string|int the value or index to select/check.
  * @param string selection control type, either 'check' or 'select'
  */
 public function select($control, $method = 'Value', $value = null, $type = null)
 {
     $method = TPropertyValue::ensureEnum($method, 'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert');
     $type = $type === null ? $this->getSelectionControlType($control) : $type;
     $total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1;
     $this->callClientFunction('Prado.Element.select', array($control, $type . $method, $value, $total));
 }
Example #2
0
 public function setMode($value)
 {
     $this->_mode = TPropertyValue::ensureEnum($value, 'TApplicationMode');
 }
Example #3
0
 /**
  * @param TColorPickerMode color picker UI mode
  */
 public function setMode($value)
 {
     $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'TColorPickerMode'), TColorPickerMode::Basic);
 }
Example #4
0
 /**
  * @param TTextAlign the alignment of the text caption. Valid values include Left and Right.
  */
 public function setTextAlign($value)
 {
     $this->setViewState('TextAlign', TPropertyValue::ensureEnum($value, 'TTextAlign'), TTextAlign::Right);
 }
Example #5
0
 /**
  * @param TDatePickerPositionMode calendar UI position
  */
 public function setPositionMode($value)
 {
     $this->setViewState('PositionMode', TPropertyValue::ensureEnum($value, 'TDatePickerPositionMode'), TDatePickerPositionMode::Bottom);
 }
Example #6
0
 /**
  * @param TScrollBars the visibility and position of scroll bars in a panel control.
  */
 public function setScrollBars($value)
 {
     $this->_scrollBars = TPropertyValue::ensureEnum($value, 'TScrollBars');
 }
Example #7
0
 /**
  * Define the way an active record finder react if an invalid magic-finder invoked
  *
  * @param TActiveRecordInvalidFinderResult
  * @see getInvalidFinderResult
  * @since 3.1.5
  */
 public function setInvalidFinderResult($value)
 {
     $this->_invalidFinderResult = TPropertyValue::ensureEnum($value, 'TActiveRecordInvalidFinderResult');
 }
Example #8
0
 /**
  * @param TInlineFrameScrollBars the visibility and position of scroll bars in an iframe.
  */
 public function setScrollBars($value)
 {
     $this->setViewState('ScrollBars', TPropertyValue::ensureEnum($value, 'TInlineFrameScrollBars'), TInlineFrameScrollBars::Auto);
 }
 /**
  * @param TSecurityManagerValidationMode hashing algorithm used to generate HMAC.
  */
 public function setValidation($value)
 {
     $this->_validation = TPropertyValue::ensureEnum($value, 'TSecurityManagerValidationMode');
 }
 /**
  * @param TTextHighlighterLineNumberStyle style of row number
  */
 public function setLineNumberStyle($value)
 {
     $this->setViewState('LineNumberStyle', TPropertyValue::ensureEnum($value, 'TTextHighlighterLineNumberStyle'));
 }
Example #11
0
 /**
  * @return string cache implementation class name.
  */
 public function getImplementationClass()
 {
     $implementation = $this->_implementation;
     if (isset(self::$_cacheTypes[$implementation])) {
         return self::$_cacheTypes[$implementation];
     }
     switch (TPropertyValue::ensureEnum($implementation, 'TSqlMapCacheTypes')) {
         case TSqlMapCacheTypes::FIFO:
             return 'TSqlMapFifoCache';
         case TSqlMapCacheTypes::LRU:
             return 'TSqlMapLruCache';
         case TSqlMapCacheTypes::Basic:
             return 'TSqlMapApplicationCache';
     }
 }
Example #12
0
 /**
  * @param TSliderDirection Direction of slider (Horizontal or Vertical)
  */
 public function setDirection($value)
 {
     $this->setViewState('Direction', TPropertyValue::ensureEnum($value, 'TSliderDirection'), TSliderDirection::Horizontal);
 }
 /**
  * @param TUserManagerPasswordMode how password is stored, clear text, or MD5 or SHA1 hashed.
  */
 public function setPasswordMode($value)
 {
     $this->_passwordMode = TPropertyValue::ensureEnum($value, 'TUserManagerPasswordMode');
 }
 /**
  * @param TValidationSummaryDisplayMode the mode of displaying error messages
  */
 public function setDisplayMode($value)
 {
     $this->setViewState('DisplayMode', TPropertyValue::ensureEnum($value, 'TValidationSummaryDisplayMode'), TValidationSummaryDisplayMode::BulletList);
 }
Example #15
0
 /**
  * @param string cache control method to use for session pages. Valid values
  *               include none/nocache/private/private_no_expire/public
  */
 public function setCacheControl($value)
 {
     session_cache_limiter(TPropertyValue::ensureEnum($value, array('none', 'nocache', 'private', 'private_no_expire', 'public')));
 }
Example #16
0
 /**
  * @return TBulletedListDisplayMode display mode of the list.
  */
 public function setDisplayMode($value)
 {
     $this->setViewState('DisplayMode', TPropertyValue::ensureEnum($value, 'TBulletedListDisplayMode'), TBulletedListDisplayMode::Text);
 }
Example #17
0
 /**
  * Sets the behavior mode of the TTextBox component.
  * @param TTextBoxMode the text mode
  * @throws TInvalidDataValueException if the input value is not a valid text mode.
  */
 public function setTextMode($value)
 {
     $this->setViewState('TextMode', TPropertyValue::ensureEnum($value, 'TTextBoxMode'), TTextBoxMode::SingleLine);
 }
 /**
  * @param TTableHeaderScope the scope of the cells that the header cell applies to.
  */
 public function setScope($value)
 {
     $this->setViewState('Scope', TPropertyValue::ensureEnum($value, 'TTableHeaderScope'), TTableHeaderScope::NotSet);
 }
Example #19
0
 /**
  * Sets the vertical alignment of the contents within the table item.
  * @param TVerticalAlign the horizontal alignment
  */
 public function setVerticalAlign($value)
 {
     $this->_verticalAlign = TPropertyValue::ensureEnum($value, 'TVerticalAlign');
 }
Example #20
0
 /**
  * @param THttpSessionCookieMode how to use cookie to store session ID
  * @throws TInvalidOperationException if session is started already
  */
 public function setCookieMode($value)
 {
     if ($this->_started) {
         throw new TInvalidOperationException('httpsession_cookiemode_unchangeable');
     } else {
         $value = TPropertyValue::ensureEnum($value, 'THttpSessionCookieMode');
         if ($value === THttpSessionCookieMode::None) {
             ini_set('session.use_cookies', '0');
         } else {
             if ($value === THttpSessionCookieMode::Allow) {
                 ini_set('session.use_cookies', '1');
                 ini_set('session.use_only_cookies', '0');
             } else {
                 ini_set('session.use_cookies', '1');
                 ini_set('session.use_only_cookies', '1');
                 ini_set('session.use_trans_sid', 0);
             }
         }
     }
 }
Example #21
0
 /**
  * @param TButtonColumnType the type of command button.
  */
 public function setButtonType($value)
 {
     $this->setViewState('ButtonType', TPropertyValue::ensureEnum($value, 'TButtonColumnType'), TButtonColumnType::LinkButton);
 }
Example #22
0
 /**
  * @param TListItemType item type
  */
 public function setItemType($value)
 {
     $this->_itemType = TPropertyValue::ensureEnum($value, 'TListItemType');
 }
Example #23
0
 /**
  * Sets the format of URLs constructed and interpretted by the request module.
  * A Get URL format is like index.php?name1=value1&name2=value2
  * while a Path URL format is like index.php/name1,value1/name2,value.
  * Changing the UrlFormat will affect {@link constructUrl} and how GET variables
  * are parsed.
  * @param THttpRequestUrlFormat the format of URLs.
  */
 public function setUrlFormat($value)
 {
     $this->_urlFormat = TPropertyValue::ensureEnum($value, 'THttpRequestUrlFormat');
 }
Example #24
0
 /**
  * @param TTableCaptionAlign table caption alignment.
  */
 public function setCaptionAlign($value)
 {
     $this->setViewState('CaptionAlign', TPropertyValue::ensureEnum($value, 'TTableCaptionAlign'), TTableCaptionAlign::NotSet);
 }
Example #25
0
 /**
  * Sets the data type that the values being compared are converted to before the comparison is made.
  * @param TValidationDataType the data type
  */
 public function setDataType($value)
 {
     $this->setViewState('DataType', TPropertyValue::ensureEnum($value, 'TValidationDataType'), TValidationDataType::String);
 }
Example #26
0
 /**
  * @param TWizardStepType the wizard step type.
  */
 public function setStepType($type)
 {
     $type = TPropertyValue::ensureEnum($type, 'TWizardStepType');
     if ($type !== $this->getStepType()) {
         $this->setViewState('StepType', $type, TWizardStepType::Auto);
         if ($this->_wizard) {
             $this->_wizard->wizardStepsChanged();
         }
     }
 }
Example #27
0
 /**
  * @param TUrlMappingPatternSecureConnection the SecureConnection behavior.
  * @since 3.2
  */
 public function setSecureConnection($value)
 {
     $this->_secureConnection = TPropertyValue::ensureEnum($value, 'TUrlMappingPatternSecureConnection');
 }
Example #28
0
 /**
  * @param TRepeatLayout how the repeated items should be displayed, using table or using line breaks.
  */
 public function setRepeatLayout($value)
 {
     $this->_repeatLayout = TPropertyValue::ensureEnum($value, 'TRepeatLayout');
 }
Example #29
0
 /**
  * Set wether the element should be constrainted in one direction
  * @param CDraggableConstraint
  */
 public function setConstraint($value)
 {
     $this->setViewState('Constraint', TPropertyValue::ensureEnum($value, 'TDraggableConstraint'), TDraggableConstraint::None);
 }
Example #30
0
 /**
  * Client script to select/clear/check a drop down list, check box list,
  * or radio button list.
  * The second parameter determines the selection method. Valid methods are
  *  - <b>Value</b>, select or check by value
  *  - <b>Values</b>, select or check by a list of values
  *  - <b>Index</b>, select or check by index (zero based index)
  *  - <b>Indices</b>, select or check by a list of index (zero based index)
  *  - <b>Clear</b>, clears or selections or checks in the list
  *  - <b>All</b>, select all
  *  - <b>Invert</b>, invert the selection.
  * @param TControl list control
  * @param string selection method
  * @param string|int the value or index to select/check.
  * @param string selection control type, either 'check' or 'select'
  */
 public function select($control, $method = 'Value', $value = null, $type = null)
 {
     $method = TPropertyValue::ensureEnum($method, 'Value', 'Index', 'Clear', 'Indices', 'Values', 'All', 'Invert');
     $type = $type === null ? $this->getSelectionControlType($control) : $type;
     $total = $this->getSelectionControlIsListType($control) ? $control->getItemCount() : 1;
     // pass the ID to avoid getting the surrounding elements (ISurroundable)
     if ($control instanceof TControl) {
         $control = $control->getClientID();
     }
     $this->callClientFunction('Prado.Element.select', array($control, $type . $method, $value, $total));
 }