本文整理汇总了PHP中TPropertyValue::ensureEnum方法的典型用法代码示例。如果您正苦于以下问题:PHP TPropertyValue::ensureEnum方法的具体用法?PHP TPropertyValue::ensureEnum怎么用?PHP TPropertyValue::ensureEnum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPropertyValue
的用法示例。
在下文中一共展示了TPropertyValue::ensureEnum方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: select
/**
* 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));
}
示例2: setMode
public function setMode($value)
{
$this->_mode = TPropertyValue::ensureEnum($value, 'TApplicationMode');
}
示例3: setMode
/**
* @param TColorPickerMode color picker UI mode
*/
public function setMode($value)
{
$this->setViewState('Mode', TPropertyValue::ensureEnum($value, 'TColorPickerMode'), TColorPickerMode::Basic);
}
示例4: setTextAlign
/**
* @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);
}
示例5: setPositionMode
/**
* @param TDatePickerPositionMode calendar UI position
*/
public function setPositionMode($value)
{
$this->setViewState('PositionMode', TPropertyValue::ensureEnum($value, 'TDatePickerPositionMode'), TDatePickerPositionMode::Bottom);
}
示例6: setScrollBars
/**
* @param TScrollBars the visibility and position of scroll bars in a panel control.
*/
public function setScrollBars($value)
{
$this->_scrollBars = TPropertyValue::ensureEnum($value, 'TScrollBars');
}
示例7: setInvalidFinderResult
/**
* 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');
}
示例8: setScrollBars
/**
* @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);
}
示例9: setValidation
/**
* @param TSecurityManagerValidationMode hashing algorithm used to generate HMAC.
*/
public function setValidation($value)
{
$this->_validation = TPropertyValue::ensureEnum($value, 'TSecurityManagerValidationMode');
}
示例10: setLineNumberStyle
/**
* @param TTextHighlighterLineNumberStyle style of row number
*/
public function setLineNumberStyle($value)
{
$this->setViewState('LineNumberStyle', TPropertyValue::ensureEnum($value, 'TTextHighlighterLineNumberStyle'));
}
示例11: getImplementationClass
/**
* @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';
}
}
示例12: setDirection
/**
* @param TSliderDirection Direction of slider (Horizontal or Vertical)
*/
public function setDirection($value)
{
$this->setViewState('Direction', TPropertyValue::ensureEnum($value, 'TSliderDirection'), TSliderDirection::Horizontal);
}
示例13: setPasswordMode
/**
* @param TUserManagerPasswordMode how password is stored, clear text, or MD5 or SHA1 hashed.
*/
public function setPasswordMode($value)
{
$this->_passwordMode = TPropertyValue::ensureEnum($value, 'TUserManagerPasswordMode');
}
示例14: setDisplayMode
/**
* @param TValidationSummaryDisplayMode the mode of displaying error messages
*/
public function setDisplayMode($value)
{
$this->setViewState('DisplayMode', TPropertyValue::ensureEnum($value, 'TValidationSummaryDisplayMode'), TValidationSummaryDisplayMode::BulletList);
}
示例15: setCacheControl
/**
* @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')));
}