本文整理汇总了PHP中UserAttributeKey::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP UserAttributeKey::getList方法的具体用法?PHP UserAttributeKey::getList怎么用?PHP UserAttributeKey::getList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserAttributeKey
的用法示例。
在下文中一共展示了UserAttributeKey::getList方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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']);
}
}
示例4: array
echo $view->action('add');
?>
" id="ccm-attribute-key-form">
<?php
Loader::element("attribute/type_form_required", array('category' => $category, 'type' => $type));
?>
</form>
<?php
}
?>
<?php
} else {
$attribs = UserAttributeKey::getList();
Loader::element('dashboard/attributes_table', array('types' => $types, 'category' => $category, 'attribs' => $attribs, 'editURL' => '/dashboard/users/attributes', 'sortable' => true));
}
}
?>
<script type="text/javascript">
$(function() {
$("ul.ccm-sortable-attribute-list-wrapper").sortable({
handle: 'i.ccm-item-select-list-sort',
cursor: 'move',
opacity: 0.5,
stop: function() {
var ualist = $(this).sortable('serialize');
ualist += '&ccm_token=' + '<?php
示例5: view
public function view()
{
$attribs = UserAttributeKey::getList();
$this->set('attribs', $attribs);
}
示例6: foreach
foreach ($slist as $sk) {
$selectedAKIDs[] = $sk->getAttributeKeyID();
}
if ($_POST['task'] == 'update_columns') {
Loader::model('attribute/category');
$sc = AttributeKeyCategory::getByHandle('user');
$sc->clearAttributeKeyCategoryColumnHeaders();
if (is_array($_POST['akID'])) {
foreach ($_POST['akID'] as $akID) {
$ak = UserAttributeKey::getByID($akID);
$ak->setAttributeKeyColumnHeader(1);
}
}
exit;
}
$list = UserAttributeKey::getList();
?>
<form method="post" id="ccm-user-customize-search-columns-form" action="<?php
echo REL_DIR_FILES_TOOLS_REQUIRED;
?>
/users/customize_search_columns/">
<?php
echo $form->hidden('task', 'update_columns');
?>
<h1><?php
echo t('Additional Searchable Attributes');
?>
</h1>
示例7: t
print t('Unknown');
break;
case '0':
print t('No');
break;
case '1':
print t('Yes');
break;
}?>
</strong></p>
<? } ?>
<br/>
<?
$attribs = UserAttributeKey::getList(true);
if (count($attribs) > 0) { ?>
<h3><?=t('User Attributes')?></h3><br/>
<?
for ($i = 0; $i < count($attribs); $i++) {
$uk = $attribs[$i];
if ($pk->validate($uk)) {
?>
<div class="row">
<div class="span5" style=""><p><strong><?=$uk->getAttributeKeyDisplayHandle()?></strong></p></div>
<div class="span5"><p>
<?=$uo->getAttribute($uk->getAttributeKeyHandle(), 'displaySanitized', 'display')?>
</p></div>
示例8: defined
<? defined('C5_EXECUTE') or die("Access Denied."); ?>
<? $included = $permissionAccess->getAccessListItems(PermissionKey::ACCESS_TYPE_INCLUDE); ?>
<? $excluded = $permissionAccess->getAccessListItems(PermissionKey::ACCESS_TYPE_EXCLUDE); ?>
<? Loader::model("attribute/categories/user"); ?>
<? $attributes = UserAttributeKey::getList(); ?>
<? $form = Loader::helper('form'); ?>
<? if (count($included) > 0 || count($excluded) > 0) { ?>
<? if (count($included) > 0) { ?>
<h3><?php
echo t('Who can edit what?');
?>
</h3>
<? foreach($included as $assignment) {
$entity = $assignment->getAccessEntityObject();
?>
<div class="clearfix">
<label><?php
echo $entity->getAccessEntityLabel();
?>
</label>
<div class="input">
<?php
echo $form->select('propertiesIncluded[' . $entity->getAccessEntityID() . ']', array('A' => t('All Attributes'), 'C' => t('Custom')), $assignment->getAttributesAllowedPermission());
?>