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


PHP Tools::atkButton方法代碼示例

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


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

示例1: _getInitHtml

 /**
  * Gets the HTML for the initial mode of the exporthandler.
  *
  * @return string The HTML for the screen
  */
 public function _getInitHtml()
 {
     $action = Tools::dispatch_url($this->m_node->m_module . '.' . $this->m_node->m_type, 'export');
     $sm = SessionManager::getInstance();
     $params = [];
     $params['formstart'] = '<form name="entryform" enctype="multipart/form-data" action="' . $action . '" method="post" class="form-horizontal">';
     $params['formstart'] .= $sm->formState();
     $params['formstart'] .= '<input type="hidden" name="phase" value="process"/>';
     $params['buttons'][] = Tools::atkButton(Tools::atktext('cancel', 'atk'), '', SessionManager::SESSION_BACK, true);
     $params['buttons'][] = '<input class="btn" type="submit" value="' . Tools::atktext('export', 'atk') . '"/>';
     $params['buttons'][] = '<input id="export_save_button" style="display:none;" value="' . Tools::atktext('save_export_selection', 'atk') . '" name="save_export" class="btn" type="submit" /> ';
     $params['content'] = '<b>' . Tools::atktext('export_config_explanation', 'atk', $this->m_node->m_type) . '</b><br/><br/>';
     $params['content'] .= $this->_getOptions();
     $params['formend'] = '</form>';
     return Ui::getInstance()->renderAction('export', $params, $this->m_node->m_module);
 }
開發者ID:sintattica,項目名稱:atk,代碼行數:21,代碼來源:ExportHandler.php

示例2: getImportButtons

 /**
  * Get import buttons.
  *
  * @param string $phase import phase ('init', 'upload', 'process', 'analyze')
  */
 public function getImportButtons($phase)
 {
     $result = [];
     $sm = SessionManager::getInstance();
     if ($sm->atkLevel() > 0) {
         $result[] = Tools::atkButton($this->m_node->text('cancel', 'atk'), '', SessionManager::SESSION_BACK, true);
     }
     if ($phase == 'init') {
         $result[] = '<input class="btn btn-primary" type="submit" value="' . $this->m_node->text('import_upload') . '">';
     } else {
         if ($phase == 'analyze') {
             $result[] = '<input type="submit" class="btn btn-primary" name="analyse" value="' . $this->m_node->text('import_analyse') . '">';
             $result[] = '<input type="submit" class="btn btn-primary" name="import" value="' . $this->m_node->text('import_import') . '"> ';
         }
     }
     return $result;
 }
開發者ID:sintattica,項目名稱:atk,代碼行數:22,代碼來源:ImportHandler.php


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