當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AttributeType::getList方法代碼示例

本文整理匯總了PHP中AttributeType::getList方法的典型用法代碼示例。如果您正苦於以下問題:PHP AttributeType::getList方法的具體用法?PHP AttributeType::getList怎麽用?PHP AttributeType::getList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AttributeType的用法示例。


在下文中一共展示了AttributeType::getList方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: parseManual

 /**
  * {@inheritdoc}
  *
  * @see \C5TL\Parser\DynamicItem::parseManual()
  */
 public function parseManual(\Gettext\Translations $translations, $concrete5version)
 {
     if (class_exists('\\AttributeType', true)) {
         foreach (\AttributeType::getList() as $at) {
             $this->addTranslation($translations, $at->getAttributeTypeName(), 'AttributeTypeName');
         }
     }
 }
開發者ID:ppiedaderawnet,項目名稱:concrete5,代碼行數:13,代碼來源:AttributeType.php

示例2: __construct

	public function __construct() {
		parent::__construct();
		$otypes = AttributeType::getList('file');
		$types = array();
		foreach($otypes as $at) {
			$types[$at->getAttributeTypeID()] = $at->getAttributeTypeName();
		}
		$this->set('types', $types);
	}
開發者ID:rii-J,項目名稱:concrete5-de,代碼行數:9,代碼來源:attributes.php

示例3: exportList

	public static function exportList($xml) {
		$attribs = AttributeType::getList();
		$db = Loader::db();
		$axml = $xml->addChild('attributetypes');
		foreach($attribs as $at) {
			$atype = $axml->addChild('attributetype');
			$atype->addAttribute('handle', $at->getAttributeTypeHandle());
			$atype->addAttribute('package', $at->getPackageHandle());
			$categories = $db->GetCol('select akCategoryHandle from AttributeKeyCategories inner join AttributeTypeCategories where AttributeKeyCategories.akCategoryID = AttributeTypeCategories.akCategoryID and AttributeTypeCategories.atID = ?', array($at->getAttributeTypeID()));
			if (count($categories) > 0) {
				$cat = $atype->addChild('categories');
				foreach($categories as $catHandle) {
					$cat->addChild('category')->addAttribute('handle', $catHandle);
				}
			}
		}
	}
開發者ID:nbourguig,項目名稱:concrete5,代碼行數:17,代碼來源:type.php

示例4: defined

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

$types = AttributeType::getList();
$categories = AttributeKeyCategory::getList();
$txt = Loader::helper('text');
$form = Loader::helper('form');
$interface = Loader::helper('concrete/interface');

echo Loader::helper('concrete/dashboard')->getDashboardPaneHeaderWrapper(t('Attribute Type Associations'), false, 'span12 offset2');?>
<form method="post" class="" id="attribute_type_associations_form" action="<?=$this->action('save_attribute_type_associations')?>">
	<table border="0" cellspacing="1" cellpadding="0" border="0" class="zebra-striped">
		<tr>
			<th><?=t('Name')?></th>
			<? foreach($categories as $cat) { ?>
				<th><?=$txt->unhandle($cat->getAttributeKeyCategoryHandle())?></th>
			<? } ?>
		</tr>
		<?php foreach($types as $at) { ?>

			<tr>
				<td><?=$at->getAttributeTypeName()?></td>
				<? foreach($categories as $cat) { ?>
					<td style="width: 1px; text-align: center"><?=$form->checkbox($cat->getAttributeKeyCategoryHandle() . '[]', $at->getAttributeTypeID(), $at->isAssociatedWithCategory($cat))?></td>
				<? } ?>
			</tr>

		<? } ?>

	</table>
	<div class="well clearfix">
	<?
開發者ID:nbourguig,項目名稱:concrete5,代碼行數:31,代碼來源:types.php


注:本文中的AttributeType::getList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。