Example #1
0
 public function testGetListByPackage()
 {
     $store = $this->getStoreMock();
     $store->expects($this->once())->method('getListByPackage')->with($this->equalTo(112))->will($this->returnValue(array('PAARDEN', 'PONNIES')));
     $packagemock = $this->getMock('stdClass', array('getPackageID', 'config'));
     $packagemock->expects($this->once())->method('getPackageID')->will($this->returnValue(112));
     $packagemock->expects($this->any())->method('config')->will($this->onConsecutiveCalls('PAARDEN', 'PONNIES'));
     Config::setStore($store);
     $ret = Config::getListByPackage($packagemock);
     $this->assertEquals($ret, array('PAARDEN', 'PONNIES'));
 }
Example #2
0
 public function view()
 {
     $pkg = Package::getByHandle('automobiles');
     $configs = Config::getListByPackage($pkg);
     $post = $this->post();
     if ($post) {
         if ($this->validate($post, $configs)) {
             $this->save($pkg, $post, $configs);
             $this->flash('Configuration saved!', 'success');
             $this->redirect('');
             //redirect to ourself
         } else {
             $this->set('error', 'Error: All configuration settings are required.');
         }
     }
     $this->set('configs', $configs);
     $this->addHeaderItem(Loader::helper('html')->css('dashboard.css', 'automobiles'));
 }
Example #3
0
 /** 
  * Returns an array of package items (e.g. blocks, themes)
  */
 public function getPackageItems()
 {
     $items = array();
     Loader::model('single_page');
     Loader::library('mail/importer');
     Loader::model('job');
     Loader::model('collection_types');
     Loader::model('system/captcha/library');
     Loader::model('system/antispam/library');
     $items['attribute_categories'] = AttributeKeyCategory::getListByPackage($this);
     $items['permission_categories'] = PermissionKeyCategory::getListByPackage($this);
     $items['permission_access_entity_types'] = PermissionAccessEntityType::getListByPackage($this);
     $items['attribute_keys'] = AttributeKey::getListByPackage($this);
     $items['attribute_sets'] = AttributeSet::getListByPackage($this);
     $items['group_sets'] = GroupSet::getListByPackage($this);
     $items['page_types'] = CollectionType::getListByPackage($this);
     $items['mail_importers'] = MailImporter::getListByPackage($this);
     $items['configuration_values'] = Config::getListByPackage($this);
     $items['block_types'] = BlockTypeList::getByPackage($this);
     $items['page_themes'] = PageTheme::getListByPackage($this);
     $items['permissions'] = PermissionKey::getListByPackage($this);
     $items['single_pages'] = SinglePage::getListByPackage($this);
     $items['attribute_types'] = AttributeType::getListByPackage($this);
     $items['captcha_libraries'] = SystemCaptchaLibrary::getListByPackage($this);
     $items['antispam_libraries'] = SystemAntispamLibrary::getListByPackage($this);
     $items['jobs'] = Job::getListByPackage($this);
     $items['workflow_types'] = WorkflowType::getListByPackage($this);
     ksort($items);
     return $items;
 }
Example #4
0
	/** 
	 * Returns an array of package items (e.g. blocks, themes)
	 */
	public function getPackageItems() {
		$items = array();
		Loader::model('single_page');
		Loader::model('dashboard/homepage');
		Loader::library('mail/importer');
		Loader::model('job');
		Loader::model('collection_types');
		$items['attribute_categories'] = AttributeKeyCategory::getListByPackage($this);
		$items['attribute_keys'] = AttributeKey::getListByPackage($this);
		$items['attribute_sets'] = AttributeSet::getListByPackage($this);
		$items['page_types'] = CollectionType::getListByPackage($this);
		$items['mail_importers'] = MailImporter::getListByPackage($this);
		$items['dashboard_modules'] = DashboardHomepageView::getModules($this);
		$items['configuration_values'] = Config::getListByPackage($this);
		$items['block_types'] = BlockTypeList::getByPackage($this);
		$items['page_themes'] = PageTheme::getListByPackage($this);
		$tp = new TaskPermissionList();		
		$items['task_permissions'] = $tp->populatePackagePermissions($this);
		$items['single_pages'] = SinglePage::getListByPackage($this);
		$items['attribute_types'] = AttributeType::getListByPackage($this);		
		$items['jobs'] = Job::getListByPackage($this);		
		ksort($items);
		return $items;
	}
Example #5
0
 /** 
  * Returns an array of package items (e.g. blocks, themes)
  */
 public function getPackageItems()
 {
     $items = array();
     Loader::model('single_page');
     Loader::library('mail/importer');
     Loader::model('job');
     Loader::model('collection_types');
     Loader::model('system/captcha/library');
     Loader::model('system/antispam/library');
     $items['attribute_categories'] = AttributeKeyCategory::getListByPackage($this);
     $items['attribute_keys'] = AttributeKey::getListByPackage($this);
     $items['attribute_sets'] = AttributeSet::getListByPackage($this);
     $items['page_types'] = CollectionType::getListByPackage($this);
     $items['mail_importers'] = MailImporter::getListByPackage($this);
     $items['configuration_values'] = Config::getListByPackage($this);
     $items['block_types'] = BlockTypeList::getByPackage($this);
     $items['page_themes'] = PageTheme::getListByPackage($this);
     $tp = new TaskPermissionList();
     $items['task_permissions'] = $tp->populatePackagePermissions($this);
     $items['single_pages'] = SinglePage::getListByPackage($this);
     $items['attribute_types'] = AttributeType::getListByPackage($this);
     $items['captcha_libraries'] = SystemCaptchaLibrary::getListByPackage($this);
     $items['antispam_libraries'] = SystemAntispamLibrary::getListByPackage($this);
     $items['jobs'] = Job::getListByPackage($this);
     ksort($items);
     return $items;
 }