当前位置: 首页>>代码示例>>PHP>>正文


PHP CollectionType::getList方法代码示例

本文整理汇总了PHP中CollectionType::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP CollectionType::getList方法的具体用法?PHP CollectionType::getList怎么用?PHP CollectionType::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CollectionType的用法示例。


在下文中一共展示了CollectionType::getList方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: on_start

 function on_start()
 {
     $cts = array();
     Loader::model('collection_types');
     $list = CollectionType::getList();
     //this just lists out the page_types in concrete5, nothing hard
     foreach ($list as $ct) {
         $cts[$ct->getCollectionTypeID()] = $ct->getCollectionTypeName();
     }
     $this->set('collectiontypes', $cts);
 }
开发者ID:herent,项目名称:wordpress_site_importer,代码行数:11,代码来源:import.php

示例2: setupForm

 protected function setupForm()
 {
     $this->loadNewsSections();
     Loader::model("collection_types");
     $ctArray = CollectionType::getList('');
     $pageTypes = array();
     foreach ($ctArray as $ct) {
         $pageTypes[$ct->getCollectionTypeID()] = $ct->getCollectionTypeName();
     }
     $this->set('pageTypes', $pageTypes);
     $this->addHeaderItem(Loader::helper('html')->javascript('tiny_mce/tiny_mce.js'));
 }
开发者ID:hanicker,项目名称:Concrete5-EasyNews,代码行数:12,代码来源:controller.php

示例3: swapContent

 public function swapContent($options)
 {
     if ($this->validateClearSiteContents($options)) {
         Loader::model("page_list");
         Loader::model("file_list");
         Loader::model("stack/list");
         $pl = new PageList();
         $pages = $pl->get();
         foreach ($pages as $c) {
             $c->delete();
         }
         $fl = new FileList();
         $files = $fl->get();
         foreach ($files as $f) {
             $f->delete();
         }
         // clear stacks
         $sl = new StackList();
         foreach ($sl->get() as $c) {
             $c->delete();
         }
         $home = Page::getByID(HOME_CID);
         $blocks = $home->getBlocks();
         foreach ($blocks as $b) {
             $b->deleteBlock();
         }
         $pageTypes = CollectionType::getList();
         foreach ($pageTypes as $ct) {
             $ct->delete();
         }
         // now we add in any files that this package has
         if (is_dir($this->getPackagePath() . '/content_files')) {
             Loader::library('file/importer');
             $fh = new FileImporter();
             $contents = Loader::helper('file')->getDirectoryContents($this->getPackagePath() . '/content_files');
             foreach ($contents as $filename) {
                 $f = $fh->import($this->getPackagePath() . '/content_files/' . $filename, $filename);
             }
         }
         // now we parse the content.xml if it exists.
         Loader::library('content/importer');
         $ci = new ContentImporter();
         $ci->importContentFile($this->getPackagePath() . '/content.xml');
     }
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:45,代码来源:package.php

示例4: array

?>
		<div class="controls">
			<?php 
echo $form->text('cvName', $searchRequest['cvName'], array('style' => 'width: 120px'));
?>
		</div>
		</div>

		<div class="span3">
		<?php 
echo $form->label('ctID', t('Page Type'));
?>
		<div class="controls">
			<? 
			Loader::model('collection_types');
			$ctl = CollectionType::getList();
			$ctypes = array('' => t('** All'));
			foreach($ctl as $ct) {
				$ctypes[$ct->getCollectionTypeID()] = $ct->getCollectionTypeName();
			}
			
			print $form->select('ctID', $ctypes, $searchRequest['ctID'], array('style' => 'width:120px'))?>

		</div>
		</div>

		<div class="span3">
		<?php 
echo $form->label('numResults', t('# Per Page'));
?>
		<div class="controls">
开发者ID:nveid,项目名称:concrete5,代码行数:31,代码来源:search_form_advanced.php

示例5: defined

<?php  defined('C5_EXECUTE') or die("Access Denied."); ?> 
<?php  $c = Page::getCurrentPage(); ?>
<ul id="ccm-pagelist-tabs" class="ccm-dialog-tabs">
	<li class="ccm-nav-active"><a id="ccm-pagelist-tab-add" href="javascript:void(0);"><?php echo ($bID>0)? t('Edit') : t('Add') ?></a></li>
	<li class=""><a id="ccm-pagelist-tab-preview"  href="javascript:void(0);"><?php echo t('Preview')?></a></li>
</ul>

<input type="hidden" name="pageListToolsDir" value="<?php echo $uh->getBlockTypeToolsURL($bt)?>/" />
<div id="ccm-pagelistPane-add" class="ccm-pagelistPane">
	<div class="ccm-block-field-group">
	  <h2><?php echo t('Number and Type of Pages')?></h2>
	  <?php echo t('Display')?>
	  <input type="text" name="num" value="<?php echo $num?>" style="width: 30px">
	  <?php echo t('pages of type')?>
	  <?php 
			$ctArray = CollectionType::getList();
	
			if (is_array($ctArray)) { ?>
	  <select name="ctID" id="selectCTID">
		<option value="0">** <?php  echo t('All')?> **</option>
		<?php  foreach ($ctArray as $ct) { ?>
		<option value="<?php echo $ct->getCollectionTypeID()?>" <?php  if ($ctID == $ct->getCollectionTypeID()) { ?> selected <?php  } ?>>
		<?php echo $ct->getCollectionTypeName()?>
		</option>
		<?php  } ?>
	  </select>
	  <?php  } ?>
	  
	  <h2><?php echo t('Filter')?></h2>
	  
	  <?php 
开发者ID:rii-J,项目名称:concrete5-de,代码行数:31,代码来源:page_list_form.php

示例6: getFilesInTheme

	public function getFilesInTheme() {
		Loader::model('collection_types');
		Loader::model('single_page');
		
		$dh = Loader::helper('file');
		$ctlist = CollectionType::getList();
		$cts = array();
		foreach($ctlist as $ct) {
			$cts[] = $ct->getCollectionTypeHandle();
		}
		
		$filesTmp = $dh->getDirectoryContents($this->ptDirectory);
		foreach($filesTmp as $f) {
			if (strrchr($f, '.') == PageTheme::THEME_EXTENSION) {
				$fHandle = substr($f, 0, strpos($f, '.'));
				
				if ($f == FILENAME_THEMES_VIEW) {
					$type = PageThemeFile::TFTYPE_VIEW;
				} else if ($f == FILENAME_THEMES_DEFAULT) {
					$type = PageThemeFile::TFTYPE_DEFAULT;
				} else if (in_array($f, SinglePage::getThemeableCorePages())) {
					$type = PageThemeFile::TFTYPE_SINGLE_PAGE;
				} else if (in_array($fHandle, $cts)) {
					$type = PageThemeFile::TFTYPE_PAGE_TYPE_EXISTING;
				} else {
					$type = PageThemeFile::TFTYPE_PAGE_TYPE_NEW;
				}
				
				$pf = new PageThemeFile();
				$pf->setFilename($f);
				$pf->setType($type);
				$files[] = $pf;
			}
		}
		
		return $files;
	}
开发者ID:remkoj,项目名称:concrete5,代码行数:37,代码来源:page_theme.php

示例7: defined

<?
defined('C5_EXECUTE') or die("Access Denied.");

Loader::model('collection_types');
$stringHelper=Loader::helper('text');
$tArray = PageTheme::getGlobalList();
$tArray2 = PageTheme::getLocalList();
$tArray = array_merge($tArray, $tArray2);
$ctArray = CollectionType::getList($c->getAllowedSubCollections());

$cp = new Permissions($c);
if ($c->getCollectionID() > 1) {
	$parent = Page::getByID($c->getCollectionParentID());
	$parentCP = new Permissions($parent);
}
if (!$cp->canAdminPage()) {
	die(t('Access Denied'));
}

$cnt = 0;
for ($i = 0; $i < count($ctArray); $i++) {
	$ct = $ctArray[$i];
	if ($c->getCollectionID() == 1 || $parentCP->canAddSubCollection($ct)) { 
		$cnt++;
	}
}

$plID = $c->getCollectionThemeID();
$ctID = $c->getCollectionTypeID();
if ($plID == 0) {
	$pl = PageTheme::getSiteTheme();
开发者ID:nbourguig,项目名称:concrete5,代码行数:31,代码来源:collection_theme.php

示例8: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
?>

<?php 
$included = $permissionAccess->getAccessListItems();
$excluded = $permissionAccess->getAccessListItems(PermissionKey::ACCESS_TYPE_EXCLUDE);
$pageTypes = CollectionType::getList();
$form = Loader::helper('form');
?>

<?php 
if (count($included) > 0 || count($excluded) > 0) {
    ?>

<?php 
    if (count($included) > 0) {
        ?>

<h3><?php 
        echo t('Who can add what?');
        ?>
</h3>

<?php 
        foreach ($included as $assignment) {
            $entity = $assignment->getAccessEntityObject();
            ?>

开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:29,代码来源:add_subpage.php


注:本文中的CollectionType::getList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。