-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Database
- DataFeed
October\Rain\Database\DataFeed
Source: ~/vendor/october/rain/src/Database/DataFeed.php
Model Data Feed class.
Combine various models in to a single feed.
Public properties
public string $tagVar
The attribute to use for each model tag name.
public string $sortVar
An alias to use for each entries timestamp attribute.
public string $sortField
Default sorting attribute.
public string $sortDirection
Default sorting direction.
public string $limitCount
Limits the number of results.
public string $limitOffset
Set the limit offset.
public bool $removeDuplicates
Protected properties
protected array $collection
Model collection pre-query.
protected Builder $queryCache
Cache containing the generic collection union query.
Public methods
public void add($tag, $item, $orderBy=NULL)
Add a new Builder to the feed collection
Parameters
- $tag
- $item
- $orderBy
public void count()
Count the number of results from the generic union query
public void get()
Executes the generic union query and eager loads the results in to the added models
public void limit($count, $offset=NULL)
Limits the number of results displayed.
Parameters
- $count
- $offset
public void orderBy($field, $direction=NULL)
Sets the default sorting field and direction.
Parameters
- $field
- $direction
public void toSql()
Returns the SQL expression used in the generic union
Protected methods
protected array getDataByTag($tag)
Returns a data stored about an item by its tag name.
Parameters
- $tag
protected Model getKeyNameByTag($tag)
Returns a model key name by its tag name.
Parameters
- $tag
protected Model getModelByTag($tag)
Returns a prepared model by its tag name.
Parameters
- $tag
protected void processCollection()
Creates a generic union query of each added collection