本文整理汇总了PHP中Codendi_Request::getInArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Codendi_Request::getInArray方法的具体用法?PHP Codendi_Request::getInArray怎么用?PHP Codendi_Request::getInArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Codendi_Request
的用法示例。
在下文中一共展示了Codendi_Request::getInArray方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
/**
* @see Transition_PostAction
*/
public function process(Codendi_Request $request)
{
if ($request->getInArray('remove_postaction', $this->id)) {
$this->getDao()->deletePostAction($this->id);
} else {
$field_id = $this->getFieldId();
$value = $request->getInArray('workflow_postaction_field_int_value', $this->id);
if ($request->validInArray('workflow_postaction_field_int', new Valid_UInt($this->id))) {
$new_field_id = $request->getInArray('workflow_postaction_field_int', $this->id);
$field_id = $this->getFieldIdOfPostActionToUpdate($new_field_id);
//Check if value is an int
$field = $this->getFormElementFactory()->getUsedFormElementById($field_id);
if ($field) {
$field->validateValue($value);
}
}
// Update if something changed
if ($field_id != $this->getFieldId() || $value != $this->value) {
$this->getDao()->updatePostAction($this->id, $field_id, $value);
}
}
}
示例2: process
public function process(Codendi_Request $request)
{
if ($request->getInArray('remove_postaction', $this->id)) {
$this->getDao()->deletePostAction($this->id);
} else {
$value = $request->getInArray('workflow_postaction_ci_build', $this->id);
$this->updateJobUrl($value);
}
}
示例3: process
/**
* Update/Delete action
*
* @param Codendi_Request $request The user's request
*
* @return void
*/
public function process(Codendi_Request $request)
{
if ($request->getInArray('remove_postaction', $this->id)) {
$this->getDao()->deletePostAction($this->id);
} else {
$field_id = $this->getFieldId();
$value_type = $this->value_type;
// Target field
if ($request->validInArray('workflow_postaction_field_date', new Valid_UInt($this->id))) {
$new_field_id = $request->getInArray('workflow_postaction_field_date', $this->id);
$field_id = $this->getFieldIdOfPostActionToUpdate($new_field_id);
}
// Value Type
$valid_value_type = new Valid_WhiteList($this->id, array(self::CLEAR_DATE, self::FILL_CURRENT_TIME));
if ($request->validInArray('workflow_postaction_field_date_value_type', $valid_value_type)) {
$value_type = $request->getInArray('workflow_postaction_field_date_value_type', $this->id);
}
// Update if something changed
if ($field_id != $this->getFieldId() || $value_type != $this->value_type) {
$this->getDao()->updatePostAction($this->id, $field_id, $value_type);
}
}
}