Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • DeleteBlock
  • DeleteOperation
  • EditBlock
  • Hooks
  • ManageBlock
  • Model
  • Module
  • SaveOperation
  • ServerName
  • Site
  • StatusOperation

Class Hooks

Namespace: Icybee\Modules\Sites
Located at vendor/icanboogie-modules/sites/lib/hooks.php

Methods summary

public static
# on_core_run( ICanBoogie\Core\RunEvent $event, ICanBoogie\Core $target )

Initializes the Icybee\Modules\Sites\Core::$site, Icybee\Modules\Sites\Core::$locale and Icybee\Modules\Sites\Core::$timezone properties of the core object. The Icybee\Modules\Sites\Core::$timezone property is only initialized is it is defined be the site.

Initializes the Icybee\Modules\Sites\Core::$site, Icybee\Modules\Sites\Core::$locale and Icybee\Modules\Sites\Core::$timezone properties of the core object. The Icybee\Modules\Sites\Core::$timezone property is only initialized is it is defined be the site.

If the current site has a path, the ICanBoogie\Routing\contextualize() and ICanBoogie\Routing\decontextualize() helpers are patched.

Parameters

$event
ICanBoogie\Core\RunEvent
$event
$target
ICanBoogie\Core
$target
public static
# before_http_dispatcher_dispatch( ICanBoogie\HTTP\Dispatcher\BeforeDispatchEvent $event, ICanBoogie\HTTP\Dispatcher $target )

Redirects the request to the first available website to the user if the request matches none.

Redirects the request to the first available website to the user if the request matches none.

Only online websites are used if the user is a guest or a member.

Parameters

$event
ICanBoogie\HTTP\Dispatcher\BeforeDispatchEvent
$event
$target
ICanBoogie\HTTP\Dispatcher
$target
public static Icybee\Modules\Sites\Site|null
# get_node_site( Icybee\Modules\Nodes\Node $node )

Returns the site active record associated to the node.

Returns the site active record associated to the node.

This is the getter for the nodes' site magic property.

<?php

$core->models['nodes']->one->site;

Parameters

$node
Icybee\Modules\Nodes\Node
$node

Returns

Icybee\Modules\Sites\Site|null
The site active record associate with the node, or null if the node is not associated to a specific site.
public static Icybee\Modules\Sites\Site
# get_core_site( ICanBoogie\Core $core )

Returns the active record for the current site.

Returns the active record for the current site.

This is the getter for the core's Icybee\Modules\Sites\Core::$site magic property.

<?php

$core->site;

Returns

Icybee\Modules\Sites\Site
public static integer
# get_core_site_id( ICanBoogie\Core $core )

Returns the key of the current site.

Returns the key of the current site.

This is the getter for the core's Site::site_id magic property.

<?php

$core->site_id;

Parameters

$core
ICanBoogie\Core
$core

Returns

integer
public static Icybee\Modules\Sites\Site
# get_site_for_request_context( ICanBoogie\HTTP\Request\Context $context )

Returns the site active record for a request.

Returns the site active record for a request.

This is the getter for the \ICanBoogie\HTTP\Request\Context::site magic property.

<?php

$core->request->context->site;

Returns

Icybee\Modules\Sites\Site
public static integer
# get_site_id_for_request_context( ICanBoogie\HTTP\Request\Context $context )

Returns the identifier of the site for a request.

Returns the identifier of the site for a request.

This is the getter for the \ICanBoogie\HTTP\Request\Context::site_id magic property.

<?php

$core->request->context->site_id;

Returns

integer

Magic methods summary

Autodoc API documentation generated by ApiGen 2.8.0