本文整理汇总了PHP中Document::setTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Document::setTitle方法的具体用法?PHP Document::setTitle怎么用?PHP Document::setTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Document
的用法示例。
在下文中一共展示了Document::setTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onCourse
/**
* Return data on a course view (this will be some form of HTML)
*
* @param object $course Current course
* @param object $offering Name of the component
* @param boolean $describe Return plugin description only?
* @return object
*/
public function onCourse($course, $offering, $describe = false)
{
if (!$offering->access('manage', 'section')) {
return;
}
$response = with(new \Hubzero\Base\Object())->set('name', $this->_name)->set('title', Lang::txt('PLG_COURSES_' . strtoupper($this->_name)))->set('description', Lang::txt('PLG_COURSES_' . strtoupper($this->_name) . '_BLURB'))->set('default_access', $this->params->get('plugin_access', 'managers'))->set('display_menu_tab', true)->set('icon', 'f083');
if ($describe) {
return $response;
}
$nonadmin = Request::getState('com_courses.offering' . $offering->get('id') . '.nonadmin', 0);
if (!($active = Request::getVar('active')) && !$nonadmin) {
Request::setVar('active', $active = $this->_name);
}
if ($response->get('name') == $active) {
// Set the page title
Document::setTitle(Document::getTitle() . ': ' . Lang::txt('PLG_COURSES_' . strtoupper($this->_name)));
Pathway::append(Lang::txt('PLG_COURSES_' . strtoupper($this->_name)), $offering->link() . '&active=' . $this->_name);
$view = with($this->view('default', 'overview'))->set('option', Request::getVar('option', 'com_courses'))->set('course', $course)->set('offering', $offering)->set('params', $this->params);
foreach ($this->getErrors() as $error) {
$view->setError($error);
}
$response->set('html', $view->loadTemplate());
}
// Return the output
return $response;
}
示例2: __construct
function __construct()
{
parent::__construct();
$this->view->setLayout('login_layout');
Document::setCss(array('login-admin'));
Document::setTitle('Đăng nhập');
}
示例3: exeAlbum
function exeAlbum()
{
if (Session::get('user') != null) {
Document::setTitle('Album ảnh');
Document::setJs(array('image', 'jquery.form'));
$data = array();
$display = 15;
$totalPage = ceil($this->model->total("`username` = '" . Session::get('user')['username'] . "'") / $display);
if ((int) Request::get('page') > 0) {
$page = Request::get('page');
if ($totalPage < $page) {
$page = $totalPage;
}
} else {
$page = 1;
}
$pageLink = new Paging($page, $totalPage);
$data['pagination'] = $pageLink->pagination('?');
$data['images'] = $this->model->selectUser(Session::get('user')['username'], ($page - 1) * $display, $display);
$data['url'] = BASE_URL . '/';
$data['action'] = BASE_URL . '/image/add';
$this->view->render('album', $data);
} else {
Until::redirectTo();
}
}
示例4: exeDefault
public function exeDefault()
{
Document::setTitle('Quản lý ảnh');
Document::setJs(array('jquery-1.8.3.min', 'image-admin'));
$data = array();
$keySearch = Request::get('keySearch');
$data['keySearch'] = $keySearch;
$condition = '';
if ($keySearch == null) {
$link = '?';
} else {
$link = '?keySearch=' . $keySearch . '&';
$condition = 'LOWER(`username`)="' . strtolower($keySearch) . '"';
}
$display = 20;
$totalPage = ceil($this->model->total($condition) / $display);
if ((int) Request::get('page') > 0) {
$page = Request::get('page');
if ($totalPage < $page) {
$page = $totalPage;
}
} else {
$page = 1;
}
$pageLink = new Paging($page, $totalPage);
$data['title'] = BASE_URL_ADMIN . '/image';
$data['pagination'] = $pageLink->pagination($link);
$data['images'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
$data['ajax'] = BASE_URL_ADMIN . '/image/load';
$data['imageLoad'] = BASE_URL . '/public/css/images/loading.gif';
$data['url'] = BASE_URL . '/';
$this->view->render('index', $data);
}
示例5: __construct
function __construct()
{
parent::__construct();
Document::setTitle('Giới thiệu');
Document::setCss(array('style'));
$this->view->setLayout('main_layout');
}
示例6: exeArticle
function exeArticle()
{
$id = (int) Request::get('article');
if ($id > 0) {
$data = $this->model->selectOne($id);
if (empty($data)) {
$data['error'] = true;
} else {
$data['error'] = false;
Document::setTitle($data['title']);
$comments = $this->exeGetComment((int) Request::get('article'), 0, 20);
$data['comments'] = $comments['data'];
$data['viewComment'] = $comments['view'];
Document::setTitle($data['title']);
if (Session::get('user') != null) {
$data['submit'] = '<input name="submitComment" type="button" class="input_submit" login="true" value="Bình luận"/>';
} else {
$data['submit'] = '<input name="submitComment" type="button" class="input_submit" value="Đăng nhập để bình luận"/>';
}
}
} else {
$data['error'] = true;
}
if ($data['error'] == true) {
Document::setTitle('Lỗi');
}
$this->view->render('article', $data);
}
示例7: exeEdit
function exeEdit()
{
$id = (int) Request::get('id');
if ($id > 0) {
if (Session::get('province') != null) {
$data = Session::get('province');
$data['error'] = '<p class="error">Bạn vui lòng nhập đầy đủ thông tin</p>';
Session::unsetSession('province');
} else {
$data = $this->model->selectOne($id);
$data['error'] = '';
}
if (empty($data)) {
Until::redirectTo('province');
} else {
Document::setTitle('Sửa - ' . $data['province']);
Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
$data['total'] = $this->model->total();
$data['member'] = BASE_URL_ADMIN . '/user';
$data['province_title'] = BASE_URL_ADMIN . '/province';
$data['actionEdit'] = BASE_URL_ADMIN . '/province/update';
$data['delete'] = BASE_URL_ADMIN . '/province/delete?id=';
$data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
$this->view->render('edit', $data);
}
} else {
Until::redirectTo('province');
}
}
示例8: getFolderList
/**
* Image Manager Popup
*
* @param string $listFolder The image directory to display
* @since 1.5
*/
function getFolderList($base = null)
{
// Get some paths from the request
if (empty($base)) {
$base = COM_MEDIA_BASE;
}
//corrections for windows paths
$base = str_replace(DIRECTORY_SEPARATOR, '/', $base);
$com_media_base_uni = str_replace(DIRECTORY_SEPARATOR, '/', COM_MEDIA_BASE);
// Get the list of folders
$folders = Filesystem::directories($base, '.', true, true);
Document::setTitle(Lang::txt('COM_MEDIA_INSERT_IMAGE'));
// Build the array of select options for the folder list
$options[] = Html::select('option', "", "/");
foreach ($folders as $folder) {
$folder = str_replace($com_media_base_uni, "", str_replace(DIRECTORY_SEPARATOR, '/', $folder));
$value = substr($folder, 1);
$text = str_replace(DIRECTORY_SEPARATOR, "/", $folder);
$options[] = Html::select('option', $value, $text);
}
// Sort the folder list array
if (is_array($options)) {
sort($options);
}
// Get asset and author id (use integer filter)
$asset = Request::getInt('asset', 0);
$author = Request::get('author', 0);
// Create the drop-down folder select list
$list = Html::select('genericlist', $options, 'folderlist', 'class="inputbox" size="1" onchange="ImageManager.setFolder(this.options[this.selectedIndex].value, ' . $asset . ', ' . $author . ')" ', 'value', 'text', $base);
return $list;
}
示例9: exeEdit
function exeEdit()
{
Document::setTitle('Sửa giới thiệu');
Document::setJs(array('ckeditor/ckeditor', 'replace-content'));
$data = $this->model->selectIntro();
$data['action'] = BASE_URL_ADMIN . '/intro/update';
$this->view->render('edit', $data);
}
示例10: exeDefault
function exeDefault()
{
Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
Document::setTitle('Quản lý quyền');
$data['acl'] = $this->model->selectAll();
$data['addLink'] = BASE_URL_ADMIN . '/acl/add';
$data['editLink'] = BASE_URL_ADMIN . '/acl/edit?id=';
$data['deleteLink'] = BASE_URL_ADMIN . '/acl/delete?id=';
$data['imageEdit'] = BASE_URL . '/public/css/images/white_edit.png';
$data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
$this->view->render('index', $data);
}
示例11: exeDetail
function exeDetail()
{
Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery'));
$data = $this->model->selectOne((int) Request::get('id'));
if (empty($data)) {
Until::redirectTo('/feedback');
}
$data['imageDelete'] = BASE_URL . '/public/css/images/trash.png';
Document::setTitle('Liên hệ - ' . $data['fullname']);
$this->model->read();
$data['delete'] = $data['delete'] = BASE_URL_ADMIN . '/feedback/delete?id=';
$this->view->render('detail', $data);
}
示例12: exeDefault
function exeDefault()
{
$id = (int) Session::get('user')['id'];
if ($id > 0) {
Document::setTitle('Bạn bè');
Document::setJs(array('relationship'));
$data = array();
$data['id'] = $id;
$data['detail'] = BASE_URL . '/user/detail?user=';
$data['invitation'] = $this->model->listInvitation($id);
$data['friends'] = $this->model->listFriends($id);
$this->view->render('index', $data);
}
}
示例13: exeEdit
function exeEdit()
{
Document::setTitle('Sửa dịch vụ');
$data = $this->model->selectOne((int) Request::get('id'));
$data['error'] = '';
if (Session::get('service_error') != null) {
$data['error'] = Session::get('service_error');
Session::unsetSession('service_error');
}
$data['service'] = BASE_URL_ADMIN . '/services';
$data['update'] = BASE_URL_ADMIN . '/services/update';
$data['services'] = $this->model->selectAll();
$data['total'] = $this->model->total();
$this->view->render('edit', $data);
}
示例14: exeDefault
function exeDefault()
{
Document::setJs(array('jquery-1.8.3.min', 'ask-delete', 'jconfirmaction.jquery', 'role', 'type_user'));
Document::setTitle('Quản lý thành viên');
$data = array();
$keySearch = Request::get('keySearch');
$find = Request::get('find');
$searchName = '';
$searchEmail = '';
if ($find == 'name') {
$searchName = 'selected="selected"';
} elseif ($find == 'email') {
$searchEmail = 'selected="selected"';
}
$data['title'] = BASE_URL_ADMIN . '/user';
$data['searchName'] = $searchName;
$data['searchEmail'] = $searchEmail;
$data['keySearch'] = $keySearch;
$condition = '';
if ($keySearch == null) {
$link = '?';
} else {
$link = '?keySearch=' . $keySearch . '&';
if ($searchEmail != '') {
$condition = "LOWER(`email`) like '%" . strtolower($keySearch) . "%'";
} else {
$condition = "LOWER(`username`) like '%" . strtolower($keySearch) . "%'";
}
if ($find == 'email') {
$link .= 'find=' . $find . '&';
}
}
$display = 20;
$totalPage = ceil($this->model->total($condition) / $display);
if ((int) Request::get('page') > 0) {
$page = Request::get('page');
if ($totalPage < $page) {
$page = $totalPage;
}
} else {
$page = 1;
}
$pageLink = new Paging($page, $totalPage);
$data['pagination'] = $pageLink->pagination($link);
$data['user'] = $this->model->selectAll(($page - 1) * $display, $display, $condition);
$data['action'] = '';
$this->view->render('index', $data);
}
示例15: displayTask
/**
* display
*/
public function displayTask()
{
Pathway::append(Lang::txt('COM_GEOSEARCH_TITLE'), 'index.php?option=' . $this->_option);
Document::setTitle(Lang::txt('COM_GEOSEARCH_TITLE'));
$filters = array();
$filters['limit'] = 1000;
//Request::getInt('limit', 1000, 'request');
$filters['start'] = 0;
//Request::getInt('limitstart', 0, 'request');
$resources = Request::getVar('resource', '', 'request');
$tags = trim(Request::getString('tags', '', 'request'));
$distance = Request::getInt('distance', '', 'request');
$location = Request::getVar('location', '', 'request');
$unit = Request::getVar('dist_units', '', 'request');
$this->view->display();
}