本文整理汇总了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);
}
示例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;
}