本文整理汇总了PHP中FormAction::getAttributes方法的典型用法代码示例。如果您正苦于以下问题:PHP FormAction::getAttributes方法的具体用法?PHP FormAction::getAttributes怎么用?PHP FormAction::getAttributes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormAction
的用法示例。
在下文中一共展示了FormAction::getAttributes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAttributes
/**
* @return array
*/
public function getAttributes()
{
// Store state in session, and pass ID to client side.
$state = array('grid' => $this->getNameFromParent(), 'actionName' => $this->actionName, 'args' => $this->args);
// Ensure $id doesn't contain only numeric characters
$id = 'gf_' . substr(md5(serialize($state)), 0, 8);
Session::set($id, $state);
$actionData['StateID'] = $id;
return array_merge(parent::getAttributes(), array('name' => 'action_gridFieldAlterAction' . '?' . http_build_query($actionData), 'data-url' => $this->gridField->Link()));
}
示例2: getAttributes
/**
* @return array
*/
public function getAttributes()
{
$state = array('grid' => $this->getNameFromParent(), 'actionName' => $this->actionName, 'args' => $this->args);
$id = 'gf_' . substr(md5(serialize($state)), 0, 8);
Session::set($id, $state);
$actionData['StateID'] = $id;
return array_merge(parent::getAttributes(), array('name' => 'action_gridFieldAlterAction?' . http_build_query($actionData), 'data-url' => $this->gridField->Link()));
}
示例3: getAttributes
public function getAttributes()
{
// Store state in session, and pass ID to client side
$state = array('grid' => $this->getNameFromParent(), 'actionName' => $this->actionName, 'args' => $this->args);
$id = preg_replace('/[^\\w]+/', '_', uniqid('', true));
Session::set($id, $state);
$actionData['StateID'] = $id;
return array_merge(parent::getAttributes(), array('name' => 'action_gridFieldAlterAction' . '?' . http_build_query($actionData), 'data-url' => $this->gridField->Link()));
}
示例4: getAttributes
public function getAttributes() {
// Store state in session, and pass ID to client side
$state = array(
'grid' => $this->getNameFromParent(),
'actionName' => $this->actionName,
'args' => $this->args,
);
$id = preg_replace('/[^\w]+/', '_', uniqid('', true));
Session::set($id, $state);
$actionData['StateID'] = $id;
return array_merge(
parent::getAttributes(),
array(
// Note: This field needs to be less than 65 chars, otherwise Suhosin security patch
// will strip it from the requests
'name' => 'action_gridFieldAlterAction'. '?' . http_build_query($actionData),
'data-url' => $this->gridField->Link(),
)
);
}
示例5: getAttributes
public function getAttributes()
{
return array_merge(parent::getAttributes(), array('type' => 'reset'));
}