當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。