kernel/private/interfaces/ezplanguageswitchercapable.php

Show: inherited
    Table of Contents

    File containing the ezpLanguageSwitcherCapable interface

    Copyright
    Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
    License
    eZ Business Use License Agreement Version 2.0  
    Package
    kernel  
    Version
    4.6.0  

    \ezpLanguageSwitcherCapable

    Package: kernel

    Interface for classes providing language switcher functionality.

    Children
    \ezpLanguageSwitcher

    Methods

    methodpublic__construct( array $params = null ) : \ezpLanguageSwitcherCapable

    Constructs a ezpLanguageSwitcherCapable object.

    The $params array is the module-params array returned in the switchlanguage/to view. This is used to construct the destination URL.

    Parameters
    Name Type Description
    $params array
    Returns
    Type Description
    \ezpLanguageSwitcherCapable
    methodpublicdestinationUrl( ) : string

    Calculates the full destination URL.

    The returned URL consists of correct hostname and URL alias for translated content.

    Returns
    Type Description
    string
    methodpublicprocess( ) : void

    This is added to serve as a hook, and can be used as seen fit.

    The default implementation perform some initialisation logic here.

    methodpublicsetDestinationSiteAccess( string $destinationSiteAccess ) : void

    Sets the name of the destination translation siteaccess.

    This name is picked up and passed on in the switchlanguage module.

    Parameters
    Name Type Description
    $destinationSiteAccess string
    methodpublicsetupTranslationSAList( string $url = null ) : mixed
    static

    Creates array structure for iterating over language switcher URLs in templates.

    This method uses the site.ini.[RegionalSettings].TranslationSA setting to build an array of the defined translation siteaccess, their language switcher URL and chosen text string representing that translation.

    Example return value:

        Array
       (
           [eng] => Array
               (
                   [url] => /switchlanguage/to/eng/Demo-content
                   [text] => Eng
               )
    
           [nor] => Array
               (
                   [url] => /switchlanguage/to/nor/Demo-content
                   [text] => Nor
               )
       )
    
    
    Parameters
    Name Type Description
    $url string
    Returns
    Type Description
    mixed
    Documentation was generated by DocBlox 0.18.1.