class Category in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-feed/src/Reader/Collection/Category.php \Zend\Feed\Reader\Collection\Category
Hierarchy
- class \Zend\Feed\Reader\Collection\AbstractCollection extends \ArrayObject
- class \Zend\Feed\Reader\Collection\Category
Expanded class hierarchy of Category
1 file declares its use of Category
- EntryInterface.php in vendor/
zendframework/ zend-feed/ src/ Reader/ Entry/ EntryInterface.php
4 string references to 'Category'
- AddHandler::buildForm in core/
modules/ views_ui/ src/ Form/ Ajax/ AddHandler.php - Form constructor.
- BlockLibraryController::listBlocks in core/
modules/ block/ src/ Controller/ BlockLibraryController.php - Shows a list of blocks that can be added to a theme's layout.
- BlockListBuilder::buildBlocksForm in core/
modules/ block/ src/ BlockListBuilder.php - Builds the main "Blocks" portion of the form.
- ConfigTranslationBlockListBuilder::buildHeader in core/
modules/ config_translation/ src/ Controller/ ConfigTranslationBlockListBuilder.php - Builds the header row for the entity listing.
File
- vendor/
zendframework/ zend-feed/ src/ Reader/ Collection/ Category.php, line 12
Namespace
Zend\Feed\Reader\CollectionView source
class Category extends AbstractCollection {
/**
* Return a simple array of the most relevant slice of
* the collection values. For example, feed categories contain
* the category name, domain/URI, and other data. This method would
* merely return the most useful data - i.e. the category names.
*
* @return array
*/
public function getValues() {
$categories = [];
foreach ($this
->getIterator() as $element) {
if (isset($element['label']) && !empty($element['label'])) {
$categories[] = $element['label'];
}
else {
$categories[] = $element['term'];
}
}
return array_unique($categories);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Category:: |
public | function |
Return a simple array of the most relevant slice of
the collection values. For example, feed categories contain
the category name, domain/URI, and other data. This method would
merely return the most useful data - i.e. the category names. Overrides AbstractCollection:: |