本文整理汇总了PHP中CollectionAttributeKey::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP CollectionAttributeKey::getList方法的具体用法?PHP CollectionAttributeKey::getList怎么用?PHP CollectionAttributeKey::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CollectionAttributeKey
的用法示例。
在下文中一共展示了CollectionAttributeKey::getList方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run() {
Cache::disableCache();
Loader::library('database_indexed_search');
$is = new IndexedSearch();
if ($_GET['force'] == 1) {
Loader::model('attribute/categories/collection');
Loader::model('attribute/categories/file');
Loader::model('attribute/categories/user');
$attributes = CollectionAttributeKey::getList();
$attributes = array_merge($attributes, FileAttributeKey::getList());
$attributes = array_merge($attributes, UserAttributeKey::getList());
foreach($attributes as $ak) {
$ak->updateSearchIndex();
}
$result = $is->reindexAll(true);
} else {
$result = $is->reindexAll();
}
if ($result->count == 0) {
return t('Indexing complete. Index is up to date');
} else {
if ($result->count == $is->searchBatchSize) {
return t('Index partially updated. %s pages indexed (maximum number.) Re-run this job to continue this process.', $result->count);
} else {
return t('Index updated. %s %s required reindexing.', $result->count, $result->count == 1 ? t('page') : t('pages'));
}
}
}
示例2: run
public function run()
{
Cache::disableAll();
$is = new IndexedSearch();
if ($_GET['force'] == 1) {
$attributes = \CollectionAttributeKey::getList();
$attributes = array_merge($attributes, \FileAttributeKey::getList());
$attributes = array_merge($attributes, \UserAttributeKey::getList());
foreach ($attributes as $ak) {
$ak->updateSearchIndex();
}
$result = $is->reindexAll(true);
} else {
$result = $is->reindexAll();
}
if ($result->count == 0) {
return t('Indexing complete. Index is up to date');
} else {
if ($result->count == $is->searchBatchSize) {
return t('Index partially updated. %s pages indexed (maximum number.) Re-run this job to continue this process.', $result->count);
} else {
return t('Index updated.') . ' ' . t2('%d page required reindexing.', '%d pages required reindexing.', $result->count, $result->count);
}
}
}
示例3: save
public function save($data)
{
//parent::save($data);
$db = Loader::db();
$page = Page::getCurrentPage();
$cID = $page->getCollectionID();
$page = Page::getByID($cID);
$page->update(array('cName' => $_REQUEST['collectionName']));
$collectionAttributes = CollectionAttributeKey::getList();
foreach ($collectionAttributes as $collectionAttribute) {
if (array_key_exists($collectionAttribute->akID, $_REQUEST['akID'])) {
$collectionAttribute->setAttribute($page, false);
}
}
}
示例4: start
public function start(Zend_Queue $q)
{
Loader::library('database_indexed_search');
$this->is = new IndexedSearch();
Loader::model('attribute/categories/collection');
Loader::model('attribute/categories/file');
Loader::model('attribute/categories/user');
$attributes = CollectionAttributeKey::getList();
$attributes = array_merge($attributes, FileAttributeKey::getList());
$attributes = array_merge($attributes, UserAttributeKey::getList());
foreach ($attributes as $ak) {
$ak->updateSearchIndex();
}
$db = Loader::db();
$db->Execute('truncate table PageSearchIndex');
$r = $db->Execute('select Pages.cID from Pages left join CollectionSearchIndexAttributes csia on Pages.cID = csia.cID where (ak_exclude_search_index is null or ak_exclude_search_index = 0) and cIsActive = 1');
while ($row = $r->FetchRow()) {
$q->send($row['cID']);
}
}
示例5: array
<?php
echo Loader::helper('concrete/dashboard')->getDashboardPaneFooterWrapper(false);
?>
<?php
} else {
?>
<?php
echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Page Attributes'), false, false, false);
?>
<?php
$attribs = CollectionAttributeKey::getList();
Loader::element('dashboard/attributes_table', array('category' => $category, 'attribs' => $attribs, 'editURL' => '/dashboard/pages/attributes'));
?>
<div class="ccm-pane-body ccm-pane-body-footer" style="margin-top: -25px">
<form method="get" class="form-stacked inline-form-fix" action="<?php
echo $this->action('select_type');
?>
" id="ccm-attribute-type-form">
<div class="clearfix">
<?php
echo $form->label('atID', t('Add Attribute'));
?>
<div class="input">
示例6: PageSearchColumnSet
if ($_POST['task'] == 'update_columns') {
$fdc = new PageSearchColumnSet();
foreach($_POST['column'] as $key) {
$fdc->addColumn($fldca->getColumnByKey($key));
}
$sortCol = $fldca->getColumnByKey($_POST['fSearchDefaultSort']);
$fdc->setDefaultSortColumn($sortCol, $_POST['fSearchDefaultSortDirection']);
$u->saveConfig('PAGE_LIST_DEFAULT_COLUMNS', serialize($fdc));
$pageList = new PageList();
$pageList->resetSearchRequest();
exit;
}
$list = CollectionAttributeKey::getList();
?>
<div class="ccm-ui">
<form method="post" id="ccm-<?php
echo $searchInstance;
?>
-customize-search-columns-form" action="<?php
echo REL_DIR_FILES_TOOLS_REQUIRED;
?>
/pages/customize_search_columns/">
<?php
echo $form->hidden('task', 'update_columns');
?>
示例7: foreach
$requiredKeys[] = $ak->getAttributeKeyID();
}
}
$setAttribs = $c->getSetCollectionAttributes();
foreach($setAttribs as $ak) {
$usedKeys[] = $ak->getAttributeKeyID();
}
$usedKeysCombined = array_merge($requiredKeys, $usedKeys);
?>
<h2>
<?php echo t('Custom Attributes')?>
<select id="ccm-meta-custom-fields">
<option value="">** <?php echo t('Add Attribute')?></option>
<?php $cAttributes = CollectionAttributeKey::getList();
foreach($cAttributes as $ck) {
if (!in_array($ck->getAttributeKeyID(), $usedKeysCombined) || $c->getCollectionTypeID()==0) {?>
<option value="<?php echo $ck->getAttributeKeyID()?>"><?php echo $ck->getAttributeKeyName()?></option>
<?php }
}?>
</select>
</h2><br/>
<?php
ob_start();
$al = Loader::helper('concrete/asset_library');