$allowSets = false; AttributeKeyCategory::add('widget', $allowSets, $pkg);
Loader::model('attribute/category'); $category = AttributeKeyCategory::add('core_commerce_product', 0);
public function filterByKeywords($keywords) { $db = Loader::db(); $keywordsExact = $db->quote($keywords); $qkeywords = $db->quote('%' . $keywords . '%'); $keys = NewObjectAttributeKey::getSearchableIndexedList(); $attribsStr = ''; foreach ($keys as $ak) { $cnt = $ak->getController(); $attribsStr.=' OR ' . $cnt->searchKeywords($keywords); } // Wipe out the attribute filtering for now... // $attribsStr = ''; $this->filter(false, '(objectName LIKE ' . $qkeywords . ' OR objectHandle LIKE ' . $qkeywords . $attribsStr . ')'); }
.../index.php/tools/packages/virtual_tables/rest?api=ENCRYPTED_USERNAME&key=ENCRYPTED_PASSWORD&format=XML&table=Table Name&numResults=100&filter[akHandle1]=>1000&filter[akHandle2]==blue
$items = $listObject->get(0,0,TRUE); foreach($items as $item) { $item->doSomeClassSpecificFunction(); }
$list = new VirtualTableItemList('Pages'); $items = $list->get(); foreach($items as $key => $item) { $pages[] = Page::getByID($key); }
This package requires Concrete version 5.4.2a2 or greater
private $query = ''; private $userQuery = ''; private $debug = false; private $filters = array();
$this->sortBy('ID', 'asc');
... $itemArray = $list->get(); $attributeValue = $itemArray[$ID]['ak_handle'];
... $itemArray = $list->get(NULL,NULL,TRUE); $attributeValue = $itemArray[$unrealatedIndexNumber]->getAttribute('ak_handle');
//add new Virtual Table and add new AttributeKeys $attributeArray = array( array( 'type' => 'number', 'handle' => 'increment_id', 'name' => 'Auto Incrementing ID', 'searchable' => 0, 'searchableIndexed' => 0, 'editable' => 0, 'header' => 1 ), array( 'type' => 'text', 'handle' => 'name', 'name' => 'Name',
Loader::helper('virtual_tables_category', 'virtual_tables'); $vtck = VirtualTablesCategoryHelper::add('core_commerce_order', NULL, $attributeArray)
$akc = AttributeKeyCategory::getByHandle('page'); $list = $akc->getObjectList(); $list->filter(...); results = $list->get();
$akc = AttributeKeyCategory::getByHandle('custom_attribute_key_category'); $list = $akc->getObjectList(); $list->filter(...); results = $list->get();