本文整理汇总了PHP中Command::getContexts方法的典型用法代码示例。如果您正苦于以下问题:PHP Command::getContexts方法的具体用法?PHP Command::getContexts怎么用?PHP Command::getContexts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Command
的用法示例。
在下文中一共展示了Command::getContexts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: verifyActionData
public function verifyActionData()
{
$returnValue = true;
if ($this->action_id != NULL && !TasksappValidator::checkInteger($this->action_id)) {
$this->errorArray['action_id'] = true;
}
if (!TasksappValidator::checkString($this->action)) {
$this->errorArray['action'] = true;
}
if (!TasksappValidator::checkList($this->importance, array("0", "1", "2", "3", "4", "wf"))) {
$this->errorArray['importance'] = true;
}
if (!TasksappValidator::checkDate($this->dateDue)) {
$this->errorArray['dateDue'] = true;
}
if (!TasksappValidator::checkList($this->context, Command::getContexts())) {
$this->errorArray['context'] = true;
}
if (!TasksappValidator::checkInteger($this->project_id)) {
$this->errorArray['project_id'] = true;
}
if (count($this->errorArray) != 0) {
$returnValue = false;
}
return $returnValue;
}
示例2: __construct
/**
* Create a new User object
*
* This method creates a new user from the username and password given in
* the login form.
*
* @param Array $inputArray Array containing the $_POST data sent from the
* login form
* @return void
*
*/
public function __construct()
{
$db = Database::getInstance();
$userArray = $db->getUserDetailsByuser_id($_SESSION['user_id']);
$this->user_id = $userArray['user_id'];
$this->username = $userArray['username'];
$this->usertype = $userArray['usertype'];
$this->contexts = Command::getContexts();
}
示例3: var_dump
</div>
<div class="formTable">
<span>date due</span>
<input type="text" id="datepicker" name="dateDue" value="<?php
echo $action->dateDue();
?>
" size="10" class="text" />
</div>
<div class="formTable">
<span>context</span>
<select name="context">
<?php
var_dump(Command::getContexts());
foreach (Command::getContexts() as $id => $context) {
print "<option value=" . $context;
if ($context == $action->context()) {
print " selected>{$context}";
} else {
print ">{$context}";
}
}
?>
</select>
</div>
<div class="formTable">
<span>project</span>
<select name="project_id">