当前位置: 首页>>代码示例>>PHP>>正文


PHP FormAction::getAttributes方法代码示例

本文整理汇总了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()));
 }
开发者ID:miamollie,项目名称:echoAerial,代码行数:13,代码来源:GridField.php

示例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()));
 }
开发者ID:maent45,项目名称:redefine_renos,代码行数:11,代码来源:GridField.php

示例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()));
 }
开发者ID:nzjoel,项目名称:sapphire,代码行数:9,代码来源:GridField.php

示例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(),
			)
		);
	}
开发者ID:redema,项目名称:sapphire,代码行数:21,代码来源:GridField.php

示例5: getAttributes

 public function getAttributes()
 {
     return array_merge(parent::getAttributes(), array('type' => 'reset'));
 }
开发者ID:SpiritLevel,项目名称:silverstripe-framework,代码行数:4,代码来源:ResetFormAction.php


注:本文中的FormAction::getAttributes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。