$_topic
$_topic : \midcom_db_topic
The topic for which we are handling a request.
Blog Archive pages handler
Shows the various archive views.
$_topic : \midcom_db_topic
The topic for which we are handling a request.
$_master : \midcom_baseclasses_components_request
The request class that has invoked this handler instance.
$_node_toolbar : \midcom_helper_toolbar
The node toolbar for the current request context. Not available during the can_handle phase.
None found |
$_view_toolbar : \midcom_helper_toolbar
The view toolbar for the current request context. Not available during the can_handle phase.
None found |
$_component : string
The name of the component, e.g. net.nehmer.static. Should be used whenever the component's name is required instead of hardcoding it.
None found |
None found |
$_l10n : \midcom_services_i18n_l10n
The components' L10n string database.
None found |
$_l10n_midcom : \midcom_services_i18n_l10n
The global MidCOM string database.
None found |
$_config : \midcom_helper_configuration
The current configuration.
None found |
None found |
None found |
None found |
get_url(\midcom_db_article $article, $allow_external = false)
\midcom_db_article | $article | |
$allow_external |
None found |
article_qb_constraints(\midgard_query_builder $qb)
Sets the constraints for QB for articles
\midgard_query_builder | $qb | The QB object |
None found |
apply_category_constraint(\midgard_query_builder $qb, string $category)
\midgard_query_builder | $qb | |
string | $category |
None found |
initialize(\midcom_baseclasses_components_request $master, \Symfony\Component\Routing\Router $router)
Initializes the request handler class, called by the component interface after instantiation.
Be aware that it is possible that a handler can come from a different component (or library) than the master class. Take this into account when getting the component data storage, configuration and l10n instances. Configuration is merged during runtime based on the system defaults and all parameters attached to the topic we're currently operating on.
\midcom_baseclasses_components_request | $master | The request class |
\Symfony\Component\Routing\Router | $router |
None found |
_on_initialize()
Initialization event handler, called at the end of the initialization process.
Use this for all initialization work you need, as the component state is already populated when this event handler is called.
None found |
show(string $element) : \midcom_response_styled
Generates a response with a given style element
string | $element |
None found |
add_breadcrumb(string $url, string $title)
Registers a new breadcrumb entry
string | $url | The URL |
string | $title | The text to display |
None found |
populate_breadcrumb_line()
Adds the registered breadcrumb entries to context_data
None found |
bind_view_to_object(\midcom_core_dbaobject $object, string $page_class = 'default')
Binds the current page view to a particular object. This will automatically connect such things like metadata and toolbars to the correct object.
\midcom_core_dbaobject | $object | The DBA class instance to bind to. |
string | $page_class | String describing page type, will be used for substyling |
None found |
__construct()
Initialize all member variables, remember to set $_component before calling this constructor from your derived classes.
None found |
None found |
None found |
None found |
add_stylesheet(string $url, string $media = false)
Convenience shortcut for adding CSS files
string | $url | The stylesheet URL |
string | $media | The media type(s) for the stylesheet, if any |
None found |
get_workflow(string $identifier, array $options = array()) : \midcom\workflow\dialog
string | $identifier | |
array | $options |
None found |
_handler_welcome(mixed $handler_id, array $args, array $data)
Shows the archive welcome page: A listing of years/months along with total post counts and similar stuff.
The handler computes all necessary data and populates the request array accordingly.
mixed | $handler_id | The ID of the handler. |
array | $args | The argument list. |
array | $data |
None found |
_show_welcome(mixed $handler_id, array $data)
Displays the welcome page.
Element sequence:
Context data for all elements:
Context data for year elements:
month_data will contain an associative array containing the following array of data indexed by month number (1-12):
mixed | $handler_id | The ID of the handler. |
array | $data |
None found |
_handler_list(mixed $handler_id, array $args, array $data)
Shows the archive. Depending on the selected handler various constraints are added to the QB. See the add_*_constraint methods for details.
mixed | $handler_id | The ID of the handler. |
array | $args | The argument list. |
array | $data |
None found |
_show_list(mixed $handler_id, array $data)
Displays the archive.
mixed | $handler_id | The ID of the handler. |
array | $data |
None found |
_prepare_request_data()
Simple helper which references all important members to the request data listing for usage within the style listing.
None found |
_compute_welcome_first_post() : \DateTime
Loads the first posting time from the DB. This is the base for all operations on the resultset.
This is done under sudo if possible, to avoid problems arising if the first posting is hidden. This keeps up performance, as an execute_unchecked() can be made in this case. If sudo cannot be acquired, the system falls back to execute().
The time of the first posting or null on failure.
None found |
_compute_welcome_posting_count(\DateTime $start, \DateTime $end) : integer
Computes the number of postings in a given timeframe.
\DateTime | $start | Start of the timeframe (inclusive) |
\DateTime | $end | End of the timeframe (exclusive) |
Posting count
None found |
_compute_welcome_data()
Computes the data nececssary for the welcome screen. Automatically put into the request data array.
None found |
_set_startend_from_year(integer $year)
Computes the start/end dates to only query a given year. It will do validation before processing, throwing 404 in case of incorrectly formatted dates.
This is used by the archive-year handler, which expects the year to be in $args[0].
integer | $year | The year to query. |
None found |
_set_startend_from_month(integer $year, integer $month)
Computes the start/end dates to only query a given month. It will do validation before processing, throwing 404 in case of incorrectly formatted dates.
This is used by the archive-month handler, which expects the year to be in $args[0] and the month to be in $args[1].
integer | $year | The year to query. |
integer | $month | The month to query. |
None found |