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


PHP AttributeType::getByID方法代码示例

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


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

示例1: save_attribute_type_associations

 public function save_attribute_type_associations()
 {
     $list = AttributeKeyCategory::getList();
     foreach ($list as $cat) {
         $cat->clearAttributeKeyCategoryTypes();
         if (is_array($this->post($cat->getAttributeKeyCategoryHandle()))) {
             foreach ($this->post($cat->getAttributeKeyCategoryHandle()) as $id) {
                 $type = AttributeType::getByID($id);
                 $cat->associateAttributeKeyType($type);
             }
         }
     }
     $this->redirect('dashboard/system/attributes/types', 'saved', 'associations_updated');
 }
开发者ID:ricardomccerqueira,项目名称:rcerqueira.portfolio,代码行数:14,代码来源:types.php

示例2: add

	public static function add($atHandle, $atName, $pkg = false) {
		$pkgID = 0;
		if (is_object($pkg)) {
			$pkgID = $pkg->getPackageID();
		}
		$db = Loader::db();
		$db->Execute('insert into AttributeTypes (atHandle, atName, pkgID) values (?, ?, ?)', array($atHandle, $atName, $pkgID));
		$id = $db->Insert_ID();
		$est = AttributeType::getByID($id);
		
		$path = $est->getAttributeTypeFilePath(FILENAME_ATTRIBUTE_DB);
		if ($path) {
			Package::installDB($path);
		}
		return $est;
	}
开发者ID:nbourguig,项目名称:concrete5,代码行数:16,代码来源:type.php

示例3: add

 public function add()
 {
     $this->select_type();
     $type = $this->get('type');
     $cnt = $type->getController();
     $e = $cnt->validateKey($this->post());
     if ($e->has()) {
         $this->set('error', $e);
     } else {
         $type = AttributeType::getByID($this->post('atID'));
         $ak = UserAttributeKey::add($type, $this->post());
         $this->redirect('/dashboard/users/attributes/', 'attribute_created');
     }
 }
开发者ID:nveid,项目名称:concrete5,代码行数:14,代码来源:attributes.php

示例4: getAttributeType

 /** 
  * Returns an attribute type object 
  */
 public function getAttributeType()
 {
     return AttributeType::getByID($this->atID);
 }
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:7,代码来源:key.php

示例5: getAttributeTypeObject

 public function getAttributeTypeObject()
 {
     $ato = AttributeType::getByID($this->atID);
     return $ato;
 }
开发者ID:homer6,项目名称:concrete5-mirror,代码行数:5,代码来源:value.php

示例6: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
if (isset($_REQUEST['akID'])) {
    $at = AttributeKey::getInstanceByID($_REQUEST['akID']);
} else {
    $at = AttributeType::getByID($_REQUEST['atID']);
}
if (is_object($at)) {
    $cnt = $at->getController();
    if (isset($_REQUEST['args']) && is_array($_REQUEST['args'])) {
        $args = $_REQUEST['args'];
    } else {
        $args = array();
    }
    if (method_exists($cnt, 'action_' . $_REQUEST['action'])) {
        //make sure the controller has the right method
        call_user_func_array(array($cnt, 'action_' . $_REQUEST['action']), $args);
    }
}
开发者ID:ojalehto,项目名称:concrete5-legacy,代码行数:20,代码来源:attribute_type_actions.php

示例7: edit

 public function edit($akID = 0)
 {
     if ($this->post('akID')) {
         $akID = $this->post('akID');
     }
     $key = CollectionAttributeKey::getByID($akID);
     if (!is_object($key) || $key->isAttributeKeyInternal()) {
         $this->redirect('/dashboard/pages/attributes');
     }
     $type = $key->getAttributeType();
     $this->set('key', $key);
     $this->set('type', $type);
     if ($this->isPost()) {
         $cnt = $type->getController();
         $cnt->setAttributeKey($key);
         $e = $cnt->validateKey($this->post());
         if ($e->has()) {
             $this->set('error', $e);
         } else {
             $type = AttributeType::getByID($this->post('atID'));
             $key->update($this->post());
             $this->redirect('/dashboard/pages/attributes/', 'attribute_updated');
         }
     }
 }
开发者ID:nveid,项目名称:concrete5,代码行数:25,代码来源:attributes.php

示例8: edit

 public function edit($akID = 0)
 {
     if ($this->post('akID')) {
         $akID = $this->post('akID');
     }
     $key = CollectionAttributeKey::getByID($akID);
     $type = $key->getAttributeType();
     $this->set('key', $key);
     $this->set('type', $type);
     if ($this->isPost()) {
         $cnt = $type->getController();
         $cnt->setAttributeKey($key);
         $e = $cnt->validateKey($this->post());
         if ($e->has()) {
             $this->set('error', $e);
         } else {
             $type = AttributeType::getByID($this->post('atID'));
             $args = array('akHandle' => $this->post('akHandle'), 'akName' => $this->post('akName'), 'akIsSearchable' => $this->post('akIsSearchable'), 'akIsSearchableIndexed' => $this->post('akIsSearchableIndexed'), 'akIsAutoCreated' => 0, 'akIsEditable' => 1);
             $key->update($this->post());
             $this->redirect('/dashboard/pages/attributes/', 'attribute_updated');
         }
     }
 }
开发者ID:VonUniGE,项目名称:concrete5-1,代码行数:23,代码来源:attributes.php

示例9: add

	public function add() {
		$this->select_type();
		$type = $this->get('type');
		$cnt = $type->getController();
		$e = $cnt->validateKey($this->post());
		if ($e->has()) {
			$this->set('error', $e);
		} else {
			$type = AttributeType::getByID($this->post('atID'));
			$args = array(
				'akHandle' => $this->post('akHandle'),
				'akName' => $this->post('akName'),
				'akIsSearchable' => $this->post('akIsSearchable'),
				'akIsSearchableIndexed' => $this->post('akIsSearchableIndexed'),
				'uakProfileDisplay' => $this->post('uakProfileDisplay'),
				'uakMemberListDisplay' => $this->post('uakMemberListDisplay'),
				'uakProfileEdit' => $this->post('uakProfileEdit'),
				'uakProfileEditRequired' => $this->post('uakProfileEditRequired'),
				'uakRegisterEdit' => $this->post('uakRegisterEdit'),
				'uakRegisterEditRequired' => $this->post('uakRegisterEditRequired'),				
				'akIsAutoCreated' => 0,
				'akIsEditable' => 1
			);
			$ak = UserAttributeKey::add($type, $this->post());
			$this->redirect('/dashboard/users/attributes/', 'attribute_created');
		}
	}
开发者ID:rii-J,项目名称:concrete5-de,代码行数:27,代码来源:attributes.php


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