本文整理汇总了PHP中ListPage类的典型用法代码示例。如果您正苦于以下问题:PHP ListPage类的具体用法?PHP ListPage怎么用?PHP ListPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ListPage类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: addWhereWithMasterTable
function addWhereWithMasterTable()
{
if ($this->masterPageType == PAGE_ADD) {
return "1=0";
}
return ListPage::addWhereWithMasterTable();
}
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:7,代码来源:listpage_embed.php
示例2: getMasterTableSQLClause
function getMasterTableSQLClause()
{
if ($this->masterPageType == PAGE_ADD) {
return "1=0";
}
return ListPage::getMasterTableSQLClause();
}
开发者ID:ryanblanchard,项目名称:Dashboard,代码行数:7,代码来源:listpage_embed.php
示例3: __construct
public function __construct()
{
parent::__construct();
$layoutExamples = array();
$layoutExamples[] = new Example('Markup Inheretence', MarkupInheritancePage::getIdentifier());
$layoutExamples[] = new Example('Panels', PanelPage::getIdentifier());
$layoutExamples[] = new Example('Borders', BorderPage::getIdentifier());
$generalExamples = array();
$generalExamples[] = new Example('Labels', LabelPage::getIdentifier());
$generalExamples[] = new Example('Links', LinkPage::getIdentifier());
$generalExamples[] = new Example('Lists', ListPage::getIdentifier());
$generalExamples[] = new Example('Tabs', TabPanelPage::getIdentifier());
$formExamples = array();
$formExamples[] = new Example('Form Fields', FormPage::getIdentifier());
$formExamples[] = new Example('Validation', ValidationPage::getIdentifier());
$formExamples[] = new Example('Special Fields', SpecialFields::getIdentifier());
$tableExamples = array();
$tableExamples[] = new Example('Data Table', DataTablePage::getIdentifier());
$ajaxExamples = array();
$ajaxExamples[] = new Example('Ajax Link', AjaxLinkPage::getIdentifier());
$ajaxExamples[] = new Example('Ajax Button', AjaxButtonPage::getIdentifier());
$authoExamples[] = new Example('Authorised Access Page', AuthorisedPage::getIdentifier());
$examples = array();
$examples[] = new ExampleType('General', $generalExamples);
$examples[] = new ExampleType('Layout', $layoutExamples);
$examples[] = new ExampleType('Form Components', $formExamples);
$examples[] = new ExampleType('Data Tables', $tableExamples);
$examples[] = new ExampleType('Ajax', $ajaxExamples);
$examples[] = new ExampleType('Security', $authoExamples);
$self = $this;
$this->add(new ListView('examples', function (picon\ListItem $item) use($self) {
$type = $item->getModelObject();
$item->add(new picon\Label('title', new picon\BasicModel($type->name)));
$item->add(new ListView('list', function (picon\ListItem $item) use($self) {
$link = new picon\Link('link', function () use($item, $self) {
$self->setPage($item->getModelObject()->page);
});
$item->add($link);
$link->add(new picon\Label('exampleName', new picon\BasicModel($item->getModelObject()->name)));
}, new picon\ArrayModel($type->examples)));
}, new ArrayModel($examples)));
}
开发者ID:picon,项目名称:picon-framework,代码行数:42,代码来源:HomePage.php
示例4: array
$rtl = $xt->getReadingOrder() == 'RTL' ? 'RTL' : '';
$xt->cssFiles[] = array("stylepath" => "styles/" . $layout->style . '/style' . $rtl . ".css", "pagestylepath" => "pagestyles/" . $layout->name . $rtl . ".css");
$xt->IEcssFiles[] = array("stylepathIE" => "styles/" . $layout->style . '/styleIE' . ".css");
}
$options['xt'] = new Xtempl();
$options['id'] = $dpParams['ids'][$d];
$options['flyId'] = $flyId++;
$mkr = 1;
foreach ($mKeys[$strTableName] as $mk) {
if ($defvalues[$mk]) {
$options['masterKeysReq'][$mkr++] = $defvalues[$mk];
} else {
$options['masterKeysReq'][$mkr++] = '';
}
}
$listPageObject = ListPage::createListPage($strTableName, $options);
// prepare code
$listPageObject->prepareForBuildPage();
$flyId = $listPageObject->recId + 1;
//set page events
foreach ($listPageObject->eventsObject->events as $event => $name) {
$listPageObject->xt->assign_event($event, $listPageObject->eventsObject, $event, array());
}
//add detail settings to master settings
$listPageObject->addControlsJSAndCSS();
$listPageObject->fillSetCntrlMaps();
$pageObject->jsSettings['tableSettings'][$strTableName] = $listPageObject->jsSettings['tableSettings'][$strTableName];
$dControlsMap[$strTableName] = $listPageObject->controlsMap;
$dViewControlsMap[$strTableName] = $listPageObject->viewControlsMap;
foreach ($listPageObject->jsSettings["global"]["shortTNames"] as $tName => $shortTName) {
$pageObject->settingsMap["globalSettings"]["shortTNames"][$tName] = $shortTName;
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:pad_pad_customer_add.php
示例5: list
// get the artist & album values
list($artist, $album) = explode('|', Music::decode($request->param('album')));
// get the list of songs
$list = Album::getSongs($artist, $album);
// walk the array and construct URLs
// The encoded URL value is actually "artist name|album title". The artist
// name is included to ensure that albums with the same name are not
// conflated and the pipe character is a delimiter
array_walk($list, function (&$v, $k) use($artist, $album) {
$v = array('name' => $v['Title'], 'url' => '/album/' . Music::encode($artist . '|' . $album) . '/song/' . Music::encode($v['file']));
});
// build the "previous" link data
$previous = array('path' => '/album', 'text' => 'Albums');
// build the shuffle link
$shuffle = '/album/' . Music::encode($artist . '|' . $album) . '/song/shuffle';
return ListPage::render($album, $previous, $shuffle, false, $list);
});
// album/1/song/2 - load all songs for album=1, play song=2, go to nowplaying
//
$klein->respond('GET', '/album/[:album]/song/[:song]', function ($request, $response) {
// get the parameters
// get the artist & album values
list($artist, $album) = explode('|', Music::decode($request->param('album')));
$song = $request->param('song');
$song = $song == 'shuffle' ? 'shuffle' : Music::decode($song);
// clear the playlist
Music::send('clear');
// get the list of songs
$songs = Album::getSongs($artist, $album);
// load the playlist with the requested songs (and figure out the current
// song position)
开发者ID:monstergfx,项目名称:pi-music,代码行数:31,代码来源:album.php
示例6: setDetailList
/**
* @param String listTName
* @param Number listId
* @param &Array data
*/
protected function setDetailList($listTName, $listId, &$data)
{
include_once getabspath('classes/listpage.php');
include_once getabspath('classes/listpage_embed.php');
include_once getabspath('classes/listpage_dpinline.php');
//array of params for classes
$options = array();
$options["id"] = $listId;
$options["firstTime"] = 1;
$options["mode"] = LIST_DETAILS;
$options["pageType"] = PAGE_LIST;
$options["masterTable"] = $this->tName;
$options["masterPageType"] = $this->pageType;
$options["mainMasterPageType"] = $this->pageType;
$options["xt"] = new Xtempl(true);
//#9607 1. Temporary fix
$options["flyId"] = $this->genId() + 1;
$options["masterKeysReq"] = array();
$mkr = 1;
$mKeys = $this->pSet->getMasterKeysByDetailTable($listTName);
$masterKeys = array();
//for PAGE_EDIT only
foreach ($mKeys as $mk) {
$options["masterKeysReq"][$mkr] = $data[$mk];
$masterKeys["masterKey" . $mkr] = $data[$mk];
$mkr++;
}
$listPageObject = ListPage::createListPage($listTName, $options);
$listPageObject->prepareForBuildPage();
if ($listPageObject->isDispGrid()) {
//set page events
foreach ($listPageObject->eventsObject->events as $event => $name) {
$listPageObject->xt->assign_event($event, $listPageObject->eventsObject, $event, array());
}
//add detail settings to master settings
$listPageObject->addControlsJSAndCSS();
$listPageObject->fillSetCntrlMaps();
$this->copyDetailPreviewJSAndCSS($listPageObject);
$this->assignDisplayDetailTableXtVariable($listPageObject);
$this->updateSettingsWidthDPData($listPageObject);
$this->viewControlsMap["dViewControlsMap"][$listTName] = $listPageObject->viewControlsMap;
$this->controlsMap["dControlsMap"][$listTName] = $listPageObject->controlsMap;
if ($this->pageType == PAGE_EDIT) {
$this->controlsMap["dControlsMap"]["masterKeys"] = $masterKeys;
}
$this->controlsMap["dpTablesParams"][] = array("tName" => $listTName, "id" => $options["id"], "pType" => PAGE_LIST);
}
$this->flyId = $listPageObject->recId + 1;
}
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:54,代码来源:runnerpage.php
示例7: array_walk
// get the params
$playlist = Music::decode($request->param('playlist'));
// get the list of songs
$list = Playlist::getSongs($playlist);
// walk the array and construct URLs
// The encoded URL value is actually "artist name|album title". The artist
// name is included to ensure that albums with the same name are not
// conflated and the pipe character is a delimiter
array_walk($list, function (&$v, $k) use($playlist) {
$v = array('name' => $v['Title'], 'url' => '/playlist/' . Music::encode($playlist) . '/song/' . Music::encode($v['file']));
});
// build the "previous" link data
$previous = array('path' => '/playlist', 'text' => 'Playlists');
// build the shuffle link
$shuffle = '/playlist/' . Music::encode($playlist) . '/song/shuffle';
return ListPage::render($playlist, $previous, $shuffle, false, $list);
});
// playlist/1/song/2 - load all songs for playlist=1, start playing song=2, go to nowplaying
//
$klein->respond('GET', '/playlist/[:playlist]/song/[:song]', function ($request, $response) {
// get the params
$playlist = Music::decode($request->param('playlist'));
$song = $request->param('song');
$song = $song == 'shuffle' ? 'shuffle' : Music::decode($song);
// clear the playlist
Music::send('clear');
// get the list of songs
$songs = Playlist::getSongs($playlist);
// load the playlist with the requested songs (and figure out the current
// song position)
$pos = 0;
开发者ID:monstergfx,项目名称:pi-music,代码行数:31,代码来源:playlist.php
示例8: array_walk
// conflated and the pipe character is a delimiter
array_walk($list, function (&$v, $k) {
$v = array('name' => $v['Title'], 'url' => '/song/' . Music::encode($v['file']));
});
$list = array_filter($list, function ($v) {
return $v['name'] ? true : false;
});
usort($list, function ($a, $b) {
if (array_key_exists('name', $a) && array_key_exists('name', $b)) {
return $a['name'] < $b['name'] ? -1 : 1;
}
return 0;
});
// build the shuffle link
$shuffle = '/song/shuffle';
return ListPage::render('Songs', null, $shuffle, false, $list);
});
// song/1 - load ALL songs, play song=1, go to nowplaying
//
$klein->respond('GET', '/song/[:song]', function ($request, $response) {
// get parameter
$song = $request->param('song');
$song = $song == 'shuffle' ? 'shuffle' : Music::decode($song);
// clear the playlist
Music::send('clear');
// get the list of songs
$songs = Song::getList();
// load the playlist with the requested songs (and figure out the current
// song position)
$pos = 0;
for ($i = 0; $i < count($songs); $i++) {
开发者ID:monstergfx,项目名称:pi-music,代码行数:31,代码来源:song.php
示例9: processListPageSecurity
public static function processListPageSecurity($table)
{
// user has necessary permissions
if (Security::checkPagePermissions($table, "S")) {
return true;
}
$mode = ListPage::readListModeFromRequest();
// check special permissions like lookup mode
if ($mode == LIST_LOOKUP && ListPage::checkLookupPermissions($table)) {
return true;
}
// page can not be displayed. Redirect or return error
// return error if the page is requested by AJAX
if ($mode != LIST_SIMPLE) {
Security::sendPermissionError();
return false;
}
// The user is logged in but lacks necessary permissions
// redirect to List page or Menu.
if (isLogged() && !isLoggedAsGuest()) {
HeaderRedirect("menu");
return false;
}
// Not logged in
// redirect to Login
// Current URL is already saved in session
redirectToLogin();
return false;
}
开发者ID:sdev1,项目名称:CloudStockEnquiry,代码行数:29,代码来源:listpage.php
示例10: addCommonHtml
/**
* Add common html code for simple mode on list page
*/
function addCommonHtml()
{
$this->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>";
$this->body["begin"] .= "<script type=\"text/javascript\" src=\"include/lang/" . getLangFileName(mlang_getcurrentlang()) . ".js\"></script>";
if ($this->isDisplayLoading) {
$this->body["begin"] .= "<script type=\"text/javascript\">Runner.runLoading(" . $this->id . ",document.body,0);</script>";
}
//$this->AddJSFile("include/customlabels");
//add parent common html code
parent::addCommonHtml();
// assign body end
$this->body['end'] = array();
$this->body['end']["method"] = "assignBodyEnd";
$this->body['end']["object"] =& $this;
}
开发者ID:samsulpendis,项目名称:Instant_Appointment,代码行数:18,代码来源:listpage_simple.php
示例11: commonAssign
function commonAssign()
{
$this->xt->assign_loopsection("groups", $this->smartyGroups);
parent::commonAssign();
// assign headcheckboxes
$this->xt->assign("add_headcheckbox", "id=\"cbadd\"");
$this->xt->assign("edt_headcheckbox", "id=\"cbedt\"");
$this->xt->assign("del_headcheckbox", "id=\"cbdel\"");
$this->xt->assign("lst_headcheckbox", "id=\"cblst\"");
$this->xt->assign("exp_headcheckbox", "id=\"cbexp\"");
$this->xt->assign("imp_headcheckbox", "id=\"cbimp\"");
$this->xt->assign("adm_headcheckbox", "id=\"cbadm\"");
// assign attrs
$this->xt->assign("addgroup_attrs", "id=\"addGroupBtn\"");
$this->xt->assign("delgroup_attrs", "id=\"delGroupBtn\"");
$this->xt->assign("rengroup_attrs", "id=\"renGroupBtn\"");
$this->xt->assign("savegroup_attrs", "id=\"saveGroupBtn\"");
$this->xt->assign("savebutton_attrs", "id=\"saveBtn\"");
$this->xt->assign("resetbutton_attrs", "id=\"resetBtn\"");
$this->xt->assign("cancelgroup_attrs", "id=\"cancelBtn\"");
// assign blocks
$this->xt->assign("grid_block", true);
$this->xt->assign("menu_block", true);
$this->xt->assign("left_block", true);
$this->xt->assign("rights_block", true);
$this->xt->assign("message_block", true);
$this->xt->assign("security_block", true);
$this->xt->assign("logoutbutton", isSingleSign());
$this->xt->assign("shiftstyle_block", true);
$this->xt->assign("savebuttons_block", true);
$this->xt->assign("search_records_block", true);
$this->xt->assign("recordcontrols_block", true);
// assign user settings
$this->xt->assign("username", htmlspecialchars($_SESSION["UserName"]));
if ($this->createLoginPage) {
$this->xt->assign("userid", htmlspecialchars($_SESSION["UserID"]));
}
$this->xt->displayBrickHidden("message");
}
开发者ID:aagusti,项目名称:padl-tng,代码行数:39,代码来源:rightspage.php
示例12: addCommonHtml
/**
* Add common html code for simple mode on list page
*/
function addCommonHtml()
{
$this->body["begin"] .= GetBaseScriptsForPage($this->isDisplayLoading);
//add parent common html code
parent::addCommonHtml();
// assign body end
$this->body['end'] = array();
AssignMethod($this->body['end'], "assignBodyEnd", $this);
}
开发者ID:kcallow,项目名称:MatchMe,代码行数:12,代码来源:listpage_simple.php
示例13: commonAssign
function commonAssign()
{
$this->xt->assign_loopsection("groups", $this->smartyGroups);
parent::commonAssign();
// assign headcheckboxes
foreach ($this->permissionNames as $perm => $t) {
$this->xt->assign($perm . "_headcheckbox", " id=\"colbox" . $perm . "\" data-perm=\"" . $perm . "\"");
}
// assign attrs
$this->xt->assign("addgroup_attrs", "id=\"addGroupBtn\"");
$this->xt->assign("delgroup_attrs", "id=\"delGroupBtn\"");
$this->xt->assign("rengroup_attrs", "id=\"renGroupBtn\"");
$this->xt->assign("savegroup_attrs", "id=\"saveGroupBtn\"");
$this->xt->assign("savebutton_attrs", "id=\"saveBtn\"");
$this->xt->assign("resetbutton_attrs", "id=\"resetBtn\"");
$this->xt->assign("cancelgroup_attrs", "id=\"cancelBtn\"");
// assign blocks
$this->xt->assign("grid_block", true);
$this->xt->assign("menu_block", true);
$this->xt->assign("left_block", true);
$this->xt->assign("rights_block", true);
$this->xt->assign("message_block", true);
$this->xt->assign("security_block", true);
$this->xt->assign("logoutbutton", isSingleSign());
$this->xt->assign("savebuttons_block", true);
$this->xt->assign("search_records_block", true);
$this->xt->assign("recordcontrols_block", true);
// assign user settings
// The user might rewrite $_SESSION["UserName"] value with HTML code in an event, so no encoding will be performed while printing this value.
$this->xt->assign("username", $_SESSION["UserName"]);
if ($this->createLoginPage) {
$this->xt->assign("userid", runner_htmlspecialchars($_SESSION["UserID"]));
}
$this->xt->displayBrickHidden("message");
}
开发者ID:kcallow,项目名称:MatchMe,代码行数:35,代码来源:rightspage.php
注:本文中的ListPage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论