Advanced content manager extension for Magento®
- a powerful CMS

Content Collection

If you want to retrieve a dummie Content Collection:

/** @var \Blackbird\ContentManager\Model\ResourceModel\Content\CollectionFactory $contentCollectionFactory */
$contentCollection = $contentCollectionFactory->create();

or

/** @var \Blackbird\ContentManager\Model\Content $contentModel */
$contentCollection = $contentModel->getCollection();

If you want to retrieve a Content Collection from a specific Content Type:

/** @var \Blackbird\ContentManager\Model\ResourceModel\Content\CollectionFactory $contentCollectionFactory */
$contentCollection = $contentCollectionFactory->create()->addContentTypeFilter($contentType);

where $contentType can be string|int|\Blackbird\ContentManager\Model\ResourceModel\Content\ContentType

or

/** @var \Blackbird\ContentManager\Model\ContentType $contentType */
$contentCollection = $contentType->load($contentTypeId)->getContentCollection();

where $contentTypeId is the content type ID. In fact you should call the get ContentCollection() on a instantiate and existing content type, not on a empty content type object.

If you want to retrieve a Content Collection from a Custom Field Relation type of 'Content':

/** @var \Blackbird\ContentManager\Model\Content $content */
$contentCollection = $content->getContentCollection($identifier, $attributes);

where $identifier is the identifier of the custom field relation type of 'conten' and $attributes is an array of attribtues to select for the collection.

100%
OpenSource

60 days
free support

Unlimited
updates

Made for developers
and webmasters

14 days money
back guarantee

Made by Magento
certified developers