當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BackendUserAuthentication::jsConfirmation方法代碼示例

本文整理匯總了PHP中TYPO3\CMS\Core\Authentication\BackendUserAuthentication::jsConfirmation方法的典型用法代碼示例。如果您正苦於以下問題:PHP BackendUserAuthentication::jsConfirmation方法的具體用法?PHP BackendUserAuthentication::jsConfirmation怎麽用?PHP BackendUserAuthentication::jsConfirmation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TYPO3\CMS\Core\Authentication\BackendUserAuthentication的用法示例。


在下文中一共展示了BackendUserAuthentication::jsConfirmation方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: reference

 /**
  * Adding CM element for Delete
  *
  * @param	string	$table	Table name
  * @param	integer	$uid	UID for the current record.
  * @param	array	$elInfo	Label for including in the confirmation message, EXT:lang/locallang_core.php:mess.delete
  * @return	array		Item array, element in $menuItems
  * @internal
  */
 function DB_delete($table, $uid, $elInfo)
 {
     $loc = 'top.content.list_frame';
     if ($this->beUser->jsConfirmation(4)) {
         $conf = "confirm(" . GeneralUtility::quoteJSvalue(sprintf($this->LANG->sL('LLL:EXT:lang/locallang_core.php:mess.delete'), $elInfo[0]) . BackendUtility::referenceCount($table, $uid, ' (There are %s reference(s) to this record!)')) . ")";
     } else {
         $conf = '1==1';
     }
     $editOnClick = 'if(' . $loc . " && " . $conf . " ){" . $loc . ".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(" . $this->backRef->frameLocation($loc . '.document') . ")+'" . "&cmd[" . $table . '][' . $uid . '][DDdelete]=1&prErr=1&vC=' . $this->beUser->veriCode() . BackendUtility::getUrlToken('tceAction') . "';hideCM();}";
     return $this->backRef->linkItem($this->LANG->getLLL('delete', $this->LL), $this->backRef->excludeIcon(IconUtility::getSpriteIcon('actions-edit-delete')), $editOnClick . 'return false;');
 }
開發者ID:mrmoree,項目名稱:vkmh_typo3,代碼行數:20,代碼來源:class.tx_ttnewscatmanager_cm1.php

示例2: FILE_paste

 /**
  * Creates element for pasting files.
  *
  * @param string $path Path to the file/directory (target)
  * @param string $target target - NOT USED.
  * @param array $elInfo Various values for the labels.
  * @return array Item array, element in $menuItems
  * @internal
  */
 public function FILE_paste($path, $target, $elInfo)
 {
     $loc = 'top.content.list_frame';
     if ($this->backendUser->jsConfirmation(JsConfirmation::COPY_MOVE_PASTE)) {
         $conf = $loc . ' && confirm(' . GeneralUtility::quoteJSvalue(sprintf($this->languageService->sL('LLL:EXT:lang/locallang_core.xlf:mess.' . ($elInfo[2] === 'copy' ? 'copy' : 'move') . '_into'), $elInfo[0], $elInfo[1])) . ')';
     } else {
         $conf = $loc;
     }
     $editOnClick = 'if(' . $conf . '){' . $loc . '.location.href=' . GeneralUtility::quoteJSvalue($this->clipObj->pasteUrl('_FILE', $path, 0) . '&redirect=') . '+top.rawurlencode(' . $this->frameLocation($loc . '.document') . '.pathname+' . $this->frameLocation($loc . '.document') . '.search);  };top.nav.refresh();';
     return $this->linkItem($this->label('pasteinto'), $this->iconFactory->getIcon('actions-document-paste-into', Icon::SIZE_SMALL)->render(), $editOnClick . 'return false;');
 }
開發者ID:vip3out,項目名稱:TYPO3.CMS,代碼行數:20,代碼來源:ClickMenu.php

示例3: FILE_paste

 /**
  * Creates element for pasting files.
  *
  * @param string $path Path to the file/directory (target)
  * @param string $target target - NOT USED.
  * @param array $elInfo Various values for the labels.
  * @return array Item array, element in $menuItems
  * @internal
  */
 public function FILE_paste($path, $target, $elInfo)
 {
     $loc = 'top.list_frame';
     $jsCode = $loc . '.location.href=' . GeneralUtility::quoteJSvalue($this->clipObj->pasteUrl('_FILE', $path, 0) . '&redirect=') . '+top.rawurlencode(' . $this->frameLocation($loc . '.document') . '.pathname+' . $this->frameLocation($loc . '.document') . '.search); top.nav.refresh();';
     if ($this->backendUser->jsConfirmation(JsConfirmation::COPY_MOVE_PASTE)) {
         $title = $this->languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_mod_web_list.xlf:clip_paste');
         $confirmMessage = sprintf($this->languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:mess.' . ($elInfo[2] === 'copy' ? 'copy' : 'move') . '_into'), $elInfo[0], $elInfo[1]);
         $jsCode = 'top.TYPO3.Modal.confirm(' . GeneralUtility::quoteJSvalue($title) . ', ' . GeneralUtility::quoteJSvalue($confirmMessage) . ')' . '.on(\'button.clicked\', function(e) { if (e.target.name === \'ok\') {' . $jsCode . '} top.TYPO3.Modal.dismiss(); });';
     }
     $editOnClick = 'if(' . $loc . ') { ' . $jsCode . ' }';
     return $this->linkItem($this->label('pasteinto'), $this->iconFactory->getIcon('actions-document-paste-into', Icon::SIZE_SMALL)->render(), $editOnClick . 'return false;');
 }
開發者ID:,項目名稱:,代碼行數:21,代碼來源:


注:本文中的TYPO3\CMS\Core\Authentication\BackendUserAuthentication::jsConfirmation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。