/** * 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)); }
public function setMode($value) { $this->_mode = TPropertyValue::ensureEnum($value, 'TApplicationMode'); }
/** * @param TColorPickerMode color picker UI mode */ public function setMode($value) { $this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'TColorPickerMode'), TColorPickerMode::Basic); }
/** * @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); }
/** * @param TDatePickerPositionMode calendar UI position */ public function setPositionMode($value) { $this->setViewState('PositionMode', TPropertyValue::ensureEnum($value, 'TDatePickerPositionMode'), TDatePickerPositionMode::Bottom); }
/** * @param TScrollBars the visibility and position of scroll bars in a panel control. */ public function setScrollBars($value) { $this->_scrollBars = TPropertyValue::ensureEnum($value, 'TScrollBars'); }
/** * 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'); }
/** * @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')); }
/** * @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'; } }
/** * @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); }
/** * @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'))); }
/** * @return TBulletedListDisplayMode display mode of the list. */ public function setDisplayMode($value) { $this->setViewState('DisplayMode', TPropertyValue::ensureEnum($value, 'TBulletedListDisplayMode'), TBulletedListDisplayMode::Text); }
/** * 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); }
/** * 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'); }
/** * @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); } } } }
/** * @param TButtonColumnType the type of command button. */ public function setButtonType($value) { $this->setViewState('ButtonType', TPropertyValue::ensureEnum($value, 'TButtonColumnType'), TButtonColumnType::LinkButton); }
/** * @param TListItemType item type */ public function setItemType($value) { $this->_itemType = TPropertyValue::ensureEnum($value, 'TListItemType'); }
/** * 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'); }
/** * @param TTableCaptionAlign table caption alignment. */ public function setCaptionAlign($value) { $this->setViewState('CaptionAlign', TPropertyValue::ensureEnum($value, 'TTableCaptionAlign'), TTableCaptionAlign::NotSet); }
/** * 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); }
/** * @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(); } } }
/** * @param TUrlMappingPatternSecureConnection the SecureConnection behavior. * @since 3.2 */ public function setSecureConnection($value) { $this->_secureConnection = TPropertyValue::ensureEnum($value, 'TUrlMappingPatternSecureConnection'); }
/** * @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'); }
/** * 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); }
/** * 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)); }