src/Charcoal/Cms/Service/Loader/SectionLoader.php 1 location
|
@@ 56-65 (lines=10) @@
|
| 53 |
|
/** |
| 54 |
|
* @return CollectionLoader |
| 55 |
|
*/ |
| 56 |
|
public function all() |
| 57 |
|
{ |
| 58 |
|
$proto = $this->modelFactory()->get($this->objType()); |
| 59 |
|
$loader = $this->collectionLoader(); |
| 60 |
|
$loader->setModel($proto); |
| 61 |
|
$loader->addFilter('active', true); |
| 62 |
|
$loader->addOrder('position', 'asc'); |
| 63 |
|
|
| 64 |
|
return $loader; |
| 65 |
|
} |
| 66 |
|
|
| 67 |
|
/** |
| 68 |
|
* @return \ArrayAccess|\Traversable |
src/Charcoal/Cms/Service/Manager/EventManager.php 1 location
|
@@ 271-280 (lines=10) @@
|
| 268 |
|
/** |
| 269 |
|
* @return CategoryInterface[]|Collection The category collection. |
| 270 |
|
*/ |
| 271 |
|
public function loadCategoryItems() |
| 272 |
|
{ |
| 273 |
|
/** @var Model $model */ |
| 274 |
|
$model = $this->modelFactory(); |
| 275 |
|
$proto = $model->get($this->categoryItemType()); |
| 276 |
|
$loader = $this->collectionLoader()->setModel($proto); |
| 277 |
|
$loader->addFilter('active', true); |
| 278 |
|
|
| 279 |
|
return $loader->load(); |
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
/** |
| 283 |
|
* @param integer $id The category id. |
src/Charcoal/Cms/Service/Manager/NewsManager.php 1 location
|
@@ 172-179 (lines=8) @@
|
| 169 |
|
/** |
| 170 |
|
* @return CategoryInterface[]|Collection The category collection. |
| 171 |
|
*/ |
| 172 |
|
public function loadCategoryItems() |
| 173 |
|
{ |
| 174 |
|
$proto = $this->modelFactory()->create($this->categoryItemType()); |
| 175 |
|
$loader = $this->collectionLoader()->setModel($proto); |
| 176 |
|
$loader->addFilter('active', true); |
| 177 |
|
|
| 178 |
|
return $loader->load(); |
| 179 |
|
} |
| 180 |
|
|
| 181 |
|
/** |
| 182 |
|
* @param integer $id The category id. |