本文整理汇总了PHP中Display::return_icon方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::return_icon方法的具体用法?PHP Display::return_icon怎么用?PHP Display::return_icon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::return_icon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_block
/**
* This method return content html containing information about teachers and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
public function get_block()
{
global $charset;
$column = 1;
$data = array();
$teacher_information_graph = $this->get_teachers_information_graph();
$html = '
<li class="widget color-blue" id="intro">
<div class="widget-head">
<h3>'.get_lang('TeachersInformationsGraph').'</h3>
<div class="widget-actions"><a onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'">'.Display::return_icon('close.gif',get_lang('Close')).'</a></div>
</div>
<div class="widget-content" align="center">
<div style="padding:10px;"><strong>'.get_lang('TimeSpentOnThePlatformLastWeekByDay').'</strong></div>
'.$teacher_information_graph.'
</div>
</li>
';
$data['column'] = $column;
$data['content_html'] = $html;
return $data;
}
示例2: lp_upload_quiz_main
function lp_upload_quiz_main()
{
// variable initialisation
$lp_id = isset($_GET['lp_id']) ? intval($_GET['lp_id']) : null;
$form = new FormValidator('upload', 'POST', api_get_self() . '?' . api_get_cidreq() . '&lp_id=' . $lp_id, '', array('enctype' => 'multipart/form-data'));
$form->addElement('header', get_lang('ImportExcelQuiz'));
$form->addElement('file', 'user_upload_quiz', get_lang('FileUpload'));
$link = '<a href="../exercice/quiz_template.xls">' . Display::return_icon('export_excel.png', get_lang('DownloadExcelTemplate')) . get_lang('DownloadExcelTemplate') . '</a>';
$form->addElement('label', '', $link);
$table = new HTML_Table(array('class' => 'table'));
$tableList = array(UNIQUE_ANSWER => get_lang('UniqueSelect'), MULTIPLE_ANSWER => get_lang('MultipleSelect'), FILL_IN_BLANKS => get_lang('FillBlanks'), MATCHING => get_lang('Matching'), FREE_ANSWER => get_lang('FreeAnswer'), GLOBAL_MULTIPLE_ANSWER => get_lang('GlobalMultipleAnswer'));
$table->setHeaderContents(0, 0, get_lang('QuestionType'));
$table->setHeaderContents(0, 1, '#');
$row = 1;
foreach ($tableList as $key => $label) {
$table->setCellContents($row, 0, $label);
$table->setCellContents($row, 1, $key);
$row++;
}
$table = $table->toHtml();
$form->addElement('label', get_lang('QuestionType'), $table);
$form->addElement('checkbox', 'user_custom_score', null, get_lang('UseCustomScoreForAllQuestions'), array('id' => 'user_custom_score'));
$form->addElement('html', '<div id="options" style="display:none">');
$form->addElement('text', 'correct_score', get_lang('CorrectScore'));
$form->addElement('text', 'incorrect_score', get_lang('IncorrectScore'));
$form->addElement('html', '</div>');
$form->addRule('user_upload_quiz', get_lang('ThisFieldIsRequired'), 'required');
$form->add_progress_bar();
$form->addButtonUpload(get_lang('Upload'), 'submit_upload_quiz');
// Display the upload field
$form->display();
}
示例3: edit_filter
function edit_filter($id, $url_params, $row)
{
global $charset;
$return = '<a href="specific_fields_add.php?action=edit&field_id=' . $row[0] . '">' . Display::return_icon('edit.gif', get_lang('Edit')) . '</a>';
$return .= ' <a href="' . api_get_self() . '?action=delete&field_id=' . $row[0] . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset)) . "'" . ')) return false;">' . Display::return_icon('delete.gif', get_lang('Delete')) . '</a>';
return $return;
}
示例4: setBreadcrumb
/**
*
* @param array $breadcrumbs
*/
protected function setBreadcrumb($breadcrumbs)
{
$course = $this->getCourse();
//$session = $this->getSession();
// Adding course breadcrumb.
if (!empty($course)) {
$courseBreadcrumb = array('name' => \Display::return_icon('home.png') . ' ' . $course->getTitle(), 'url' => array('route' => 'course', 'routeParameters' => array('cidReq' => $course->getCode(), 'id_session' => api_get_session_id())));
array_unshift($breadcrumbs, $courseBreadcrumb);
}
$app = $this->app;
$app['main_breadcrumb'] = function ($app) use($breadcrumbs) {
/** @var \Knp\Menu\MenuItem $menu */
$menu = $app['knp_menu.factory']->createItem('root', array('childrenAttributes' => array('class' => 'breadcrumb', 'currentClass' => 'active')));
if (!empty($breadcrumbs)) {
foreach ($breadcrumbs as $item) {
if (empty($item['url'])) {
$item['url'] = array();
}
$menu->addChild($item['name'], $item['url']);
}
}
return $menu;
};
$matcher = new Matcher();
$voter = new \Knp\Menu\Silex\Voter\RouteVoter();
$voter->setRequest($this->getRequest());
$matcher->addVoter($voter);
$renderer = new \Knp\Menu\Renderer\TwigRenderer($this->get('twig'), 'bread.tpl', $matcher);
$bread = $renderer->render($this->get('main_breadcrumb'), array('template' => 'default/layout/bread.tpl'));
$app['breadcrumbs'] = $bread;
}
示例5: display
/**
* Displays the title + grid
*/
public function display()
{
// action links
$content = Display::actions(array(array('url' => 'event_type.php', 'content' => Display::return_icon('new_document.png', get_lang('Add'), array(), ICON_SIZE_MEDIUM))));
$content .= Display::grid_html('event_email_template');
return $content;
}
示例6: get_block
/**
* This method return content html containing information about courses and its position for showing it inside dashboard interface
* it's important to use the name 'get_block' for beeing used from dashboard controller
* @return array column and content html
*/
public function get_block()
{
global $charset;
$column = 2;
$data = array();
$content = $this->get_content_html();
$html = '
<li class="widget color-green" id="intro">
<div class="widget-head">
<h3>' . get_lang('CoursesInformation') . '</h3>
<div class="widget-actions"><a onclick="javascript:if(!confirm(\'' . addslashes(
api_htmlentities(
get_lang('ConfirmYourChoice'),
ENT_QUOTES,
$charset
)
) . '\')) return false;" href="index.php?action=disable_block&path=' . $this->path . '">' . Display::return_icon(
'close.gif',
get_lang('Close')
) . '</a></div>
</div>
<div class="widget-content">
' . $content . '
</div>
</li>
';
$data['column'] = $column;
$data['content_html'] = $html;
return $data;
}
示例7: getElementJS
/**
* Get the necessary javascript for this datepicker
* @return string
*/
private function getElementJS()
{
$js = null;
$id = $this->getAttribute('id');
$js .= "<script>\n \$(function() {\n /*\$('#{$id}').hide().datepicker({\n defaultDate: '" . $this->getValue() . "',\n dateFormat: 'yy-mm-dd',\n altField: '#{$id}_alt',\n altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",\n showOn: 'both',\n buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',\n buttonImageOnly: true,\n buttonText: '" . get_lang('SelectDate') . "',\n changeMonth: true,\n changeYear: true,\n yearRange: 'c-60y:c+5y'\n });*/\n\n \$('#{$id}').datetimepicker({\n defaultDate: '" . $this->getValue() . "',\n format: 'YYYY-MM-DD'\n });\n\n });\n </script>";
return $js;
}
示例8: display
/**
* Displays the title + grid
*/
public function display()
{
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="career_dashboard.php">' . Display::return_icon('back.png', get_lang('Back'), '', '32') . '</a>';
echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('new_career.png', get_lang('Add'), '', '32') . '</a>';
echo '</div>';
echo Display::grid_html('careers');
}
示例9: getElementJS
/**
* Get the necessary javascript for this datepicker
* @return string
*/
private function getElementJS()
{
$js = null;
$id = $this->getAttribute('id');
//timeFormat: 'hh:mm'
$js .= "<script>\n \$(function() {\n \$('#{$id}').hide().datetimepicker({\n defaultDate: '" . $this->getValue() . "',\n dateFormat: 'yy-mm-dd',\n timeFormat: 'HH:mm',\n altField: '#{$id}_alt',\n altFormat: \"" . get_lang('DateFormatLongNoDayJS') . "\",\n altTimeFormat: \"" . get_lang('TimeFormatNoSecJS') . "\",\n altSeparator: \" " . get_lang('AtTime') . " \",\n altFieldTimeOnly: false,\n showOn: 'both',\n buttonImage: '" . Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true) . "',\n buttonImageOnly: true,\n buttonText: '" . get_lang('SelectDate') . "'\n });\n });\n </script>";
return $js;
}
示例10: build_export_form_option
protected function build_export_form_option($show_pdf = true)
{
$this->addElement('header', get_lang('ChooseFormat'));
$this->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV (Comma-Separated Values)', 'csv');
$this->addElement('radio', 'file_type', null, 'XML (Extensible Markup Language)', 'xml');
$this->addElement('radio', 'file_type', Display::return_icon('info3.gif', get_lang('ToExportMustLockEvaluation')), 'PDF (Portable Document Format)', 'pdf', array('disabled'));
$this->addElement('style_submit_button', 'submit', get_lang('Export'), 'class="upload"');
$this->setDefaults(array('file_type' => 'csv'));
}
示例11: display
/**
* Displays the title + grid
*/
public function display()
{
// action links
echo '<div class="actions" style="margin-bottom:20px">';
echo '<a href="grade_models.php">' . Display::return_icon('back.png', get_lang('Back'), '', '32') . '</a>';
echo '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('add.png', get_lang('Add'), '', '32') . '</a>';
echo '</div>';
echo Display::grid_html('grade_model');
}
示例12: modify_filter
/**
* Filter for sortable table to display edit icons for class
*/
function modify_filter($class_id)
{
$class_id = Security::remove_XSS($class_id);
$result = '<a href="class_information.php?id=' . $class_id . '">' . Display::return_icon('synthese_view.gif', get_lang('Info')) . '</a>';
$result .= ' <a href="class_edit.php?idclass=' . $class_id . '">' . Display::return_icon('edit.png', get_lang('Edit')) . '</a>';
$result .= ' <a href="subscribe_user2class.php?idclass=' . $class_id . '">' . Display::return_icon('add_multiple_users.gif', get_lang('AddUsersToAClass')) . '</a>';
$result .= ' <a href="class_list.php?action=delete_class&class_id=' . $class_id . '" onclick="javascript: if(!confirm(' . "'" . addslashes(get_lang("ConfirmYourChoice")) . "'" . ')) return false;">' . Display::return_icon('delete.png', get_lang('Delete')) . '</a>';
return $result;
}
示例13: listing
/**
* Displays the title + grid
*/
public function listing()
{
// action links
$html = '<div class="actions">';
//$html .= '<a href="career_dashboard.php">'.Display::return_icon('back.png',get_lang('Back'),'','32').'</a>';
$html .= '<a href="' . api_get_self() . '?action=add">' . Display::return_icon('add.png', get_lang('Add'), '', '32') . '</a>';
$html .= '</div>';
$html .= Display::grid_html('timelines');
return $html;
}
示例14: ch_qti2_display_form
/**
* This function displays the form for import of the zip file with qti2
*/
function ch_qti2_display_form()
{
$name_tools = get_lang('ImportQtiQuiz');
$form = '<div class="actions">';
$form .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'exercice/exercise.php?show=test&' . api_get_cidreq() . '">' . Display::return_icon('back.png', get_lang('BackToExercisesList'), '', ICON_SIZE_MEDIUM) . '</a>';
$form .= '</div>';
$formValidator = new FormValidator('qti_upload', 'post', api_get_self() . "?" . api_get_cidreq(), null, array('enctype' => 'multipart/form-data'));
$formValidator->addElement('header', $name_tools);
$formValidator->addElement('file', 'userFile', get_lang('DownloadFile'));
$formValidator->addButtonImport(get_lang('Upload'));
$form .= $formValidator->returnForm();
echo $form;
}
示例15: lp_upload_quiz_main
function lp_upload_quiz_main()
{
// variable initialisation
$lp_id = Security::remove_XSS($_GET['lp_id']);
$form = new FormValidator('upload', 'POST', api_get_self() . '?' . api_get_cidreq() . '&lp_id=' . $lp_id, '', array('enctype' => 'multipart/form-data'));
$form->addElement('header', get_lang('ImportExcelQuiz'));
$form->addElement('file', 'user_upload_quiz', get_lang('FileUpload'));
$link = '<a href="../exercice/quiz_template.xls">' . Display::return_icon('export_excel.png', get_lang('DownloadExcelTemplate'), null, 16) . get_lang('DownloadExcelTemplate');
$form->addElement('advanced_settings', $link);
//button send document
$form->addElement('style_submit_button', 'submit_upload_quiz', get_lang('Send'), 'class="upload"');
// Display the upload field
$form->display();
}