Use Class List?
Permalink
Does anyone have/know a list of all classes you can "use"?
I am trying to update a few packages but I'm getting stuck on things like AttributeKeyCategory. I got my attributes to work but the attribute sets do not. I think a super quick niddy-griddy list would help a lot of people out.
Example:
Of course, in this example, I get Class 'Concrete\Core\Attribute\Topic' not found because I have absolutely no clue if this is the correct class to add a category :)
Example in use:
Obviously just sticking a use in front of some classes like in the guide posted here is not going to work for everything.
Thanks in advance!
I am trying to update a few packages but I'm getting stuck on things like AttributeKeyCategory. I got my attributes to work but the attribute sets do not. I think a super quick niddy-griddy list would help a lot of people out.
Example:
use Package; use Loader; use BlockType; use SinglePage; use AttributeSet; use Concrete\Core\Attribute\Type as AttributeType; //works use Concrete\Core\Attribute\Topic as AttributeKeyCategory; //does not work?? use AttributeKeyType; use AttributeKeySet; use FileAttributeKey; use CollectionAttributeKey;
Of course, in this example, I get Class 'Concrete\Core\Attribute\Topic' not found because I have absolutely no clue if this is the correct class to add a category :)
Example in use:
//ADD ATTRIBUTE $txtatt = AttributeType::getByHandle('text'); $bool = AttributeType::getByHandle('boolean'); $as = AttributeSet::getByHandle('my_package'); //CREATE ATTRIBUTE SET if(!(AttributeSet::getByHandle('my_package') instanceof AttributeSet)) { $cat = AttributeKeyCategory::getByHandle('file'); $set = $cat->addSet('my_package', 'My Package', $pkg); $asID = $set->asID; } if(!(FileAttributeKey::getByHandle('boolean_my_package') instanceof FileAttributeKey)) { $key1 = FileAttributeKey::add($bool, array( 'akHandle' => 'boolean_my_package', 'akName' => 'Yes Or No?', 'akIsSearchable' => 1,
Viewing 15 lines of 21 lines. View entire code block.
Obviously just sticking a use in front of some classes like in the guide posted here is not going to work for everything.
Thanks in advance!
I did a search and made up this list, It's given me a place to try different things:
use Area
use Block;
use BlockType;
use CollectionAttributeKey;
use Config;
use Cookie;
use Core;
use Database;
use Environment;
use Exception;
use File;
use FileAttributeKey;
use FileSet;
use GroupList;
use Less_Parser;
use Less_Tree_Rule;
use Loader;
use Page;
use Page;use PageList;
use PageTemplate;
use PageType;
use Permissions;
use PermissionsAccess;
use PermissionsKey;
use Redirect;
use Session;
use Stack;
use StackList;
use URL;
use User;
use UserAttributeKey;
use UserInfo;
use View;
use \Concrete\Core\Editor\Snippet;
use \Concrete\Core\Block\BlockController;
use Sunra\PhpSimple\HtmlDomParser;
use \Concrete\Core\Block\BlockController;
use \Concrete\Core\Area\Layout\Layout as AreaLayout;
use \Concrete\Core\Area\Layout\Preset as AreaLayoutPreset;
use \Concrete\Core\Area\Layout\CustomLayout as CustomAreaLayout;
use \Concrete\Core\Area\Layout\ThemeGridLayout as ThemeGridAreaLayout;
use \Concrete\Core\Asset\CSSAsset;
use \Concrete\Core\Block\BlockController;
use Concrete\Core\Conversation\Conversation;
use Concrete\Core\Feature\ConversationFeatureInterface;
use Concrete\Core\Http\ResponseAssetGroup;
use \Concrete\Core\Gathering\Gathering;
use \Concrete\Core\Page\Type\Composer\FormLayoutSetControl as PageTypeComposerFormLayoutSetControl;
use \Concrete\Core\Page\Type\Composer\OutputControl as PageTypeComposerOutputControl;
use \Concrete\Core\Backup\ContentImporter;
use \Concrete\Core\Backup\ContentExporter;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Block\View\BlockViewTemplate;
use \Concrete\Core\Marketplace\RemoteItemList as MarketplaceRemoteItemList;
use Concrete\Controller\SinglePage\Dashboard\News;
use \Concrete\Core\Block\BlockController;
use \Concrete\Core\Activity\Newsflow;
use \Concrete\Core\User\Statistics as UserStatistics;
use \Concrete\Block\Form\Statistics as FormBlockStatistics;
use \Concrete
use \Core\Page\Statistics as PageStatistics;
use Concrete\Core\Page\PageList;
use Concrete\Core\Page\Type\Type;
use Concrete\Core\Foundation\Object;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Attribute\Key\Category as AttributeKeyCategory;
use Concrete\Core\Attribute\Key\CollectionKey as CollectionAttributeKey;
use CollectionAttributeKey;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Page\Feed;
use Concrete\Core\Attribute\Key\CollectionKey;
use \Concrete\Core\Block\BlockController;
use Concrete\Core\Sharing\ShareThisPage\ServiceList;
use Concrete\Core\Sharing\ShareThisPage\Service;
use Concrete\Core\Sharing\SocialNetwork\Link;
use Concrete\Core\Sharing\SocialNetwork\Service;
use Concrete\Attribute\Select\Option;
use \Concrete\Core\Block\BlockController;
use CollectionAttributeKey;
use Concrete\Core\Attribute\Key\CollectionKey;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Tree\Tree;
use Concrete\Core\Tree\Type\Topic as TopicTree;
use Concrete\Core\Tree\Type\Topic;
use Area
use Block;
use BlockType;
use CollectionAttributeKey;
use Config;
use Cookie;
use Core;
use Database;
use Environment;
use Exception;
use File;
use FileAttributeKey;
use FileSet;
use GroupList;
use Less_Parser;
use Less_Tree_Rule;
use Loader;
use Page;
use Page;use PageList;
use PageTemplate;
use PageType;
use Permissions;
use PermissionsAccess;
use PermissionsKey;
use Redirect;
use Session;
use Stack;
use StackList;
use URL;
use User;
use UserAttributeKey;
use UserInfo;
use View;
use \Concrete\Core\Editor\Snippet;
use \Concrete\Core\Block\BlockController;
use Sunra\PhpSimple\HtmlDomParser;
use \Concrete\Core\Block\BlockController;
use \Concrete\Core\Area\Layout\Layout as AreaLayout;
use \Concrete\Core\Area\Layout\Preset as AreaLayoutPreset;
use \Concrete\Core\Area\Layout\CustomLayout as CustomAreaLayout;
use \Concrete\Core\Area\Layout\ThemeGridLayout as ThemeGridAreaLayout;
use \Concrete\Core\Asset\CSSAsset;
use \Concrete\Core\Block\BlockController;
use Concrete\Core\Conversation\Conversation;
use Concrete\Core\Feature\ConversationFeatureInterface;
use Concrete\Core\Http\ResponseAssetGroup;
use \Concrete\Core\Gathering\Gathering;
use \Concrete\Core\Page\Type\Composer\FormLayoutSetControl as PageTypeComposerFormLayoutSetControl;
use \Concrete\Core\Page\Type\Composer\OutputControl as PageTypeComposerOutputControl;
use \Concrete\Core\Backup\ContentImporter;
use \Concrete\Core\Backup\ContentExporter;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Block\View\BlockViewTemplate;
use \Concrete\Core\Marketplace\RemoteItemList as MarketplaceRemoteItemList;
use Concrete\Controller\SinglePage\Dashboard\News;
use \Concrete\Core\Block\BlockController;
use \Concrete\Core\Activity\Newsflow;
use \Concrete\Core\User\Statistics as UserStatistics;
use \Concrete\Block\Form\Statistics as FormBlockStatistics;
use \Concrete
use \Core\Page\Statistics as PageStatistics;
use Concrete\Core\Page\PageList;
use Concrete\Core\Page\Type\Type;
use Concrete\Core\Foundation\Object;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Attribute\Key\Category as AttributeKeyCategory;
use Concrete\Core\Attribute\Key\CollectionKey as CollectionAttributeKey;
use CollectionAttributeKey;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Page\Feed;
use Concrete\Core\Attribute\Key\CollectionKey;
use \Concrete\Core\Block\BlockController;
use Concrete\Core\Sharing\ShareThisPage\ServiceList;
use Concrete\Core\Sharing\ShareThisPage\Service;
use Concrete\Core\Sharing\SocialNetwork\Link;
use Concrete\Core\Sharing\SocialNetwork\Service;
use Concrete\Attribute\Select\Option;
use \Concrete\Core\Block\BlockController;
use CollectionAttributeKey;
use Concrete\Core\Attribute\Key\CollectionKey;
use Concrete\Core\Block\BlockController;
use Concrete\Core\Tree\Tree;
use Concrete\Core\Tree\Type\Topic as TopicTree;
use Concrete\Core\Tree\Type\Topic;
Since they are aliasing the full namespace isn't needed for these... However, my attribute problem still remains. The class is not being instantiated I can only assume (Call to a member function addKey() on a non-object) Looking at the class I see that my group is indeed in the database. Not sure what's up with that.
EDIT:
I got it right just now. I don't understand how this code even worked before. I know so much more than I did last year. Well I hope the list above can help someone who's at least creating a new package. This is how to add attribute set under the "file" type: