symfony API

PartialHelper Functions

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.0 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.0 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

PartialHelper.

Function Summary

Function Details

  • (void) end_slot () Browse code

    Stops the content capture and save the content in the slot.

  • (string) get_component (, , ) Browse code

    Evaluates and returns a component.

    The syntax is similar to the one of include_component.

    Example:

    echo get_component('mymodule', 'mypartial', array('myvar' => 12345));

    returns result of the component execution

  • (string) get_component_slot (, ) Browse code

    Evaluates and returns a component slot.

    The syntax is similar to the one of include_component_slot.

    Example:

    echo get_component_slot('sidebar', array('myvar' => 12345));

    returns result of the component execution

  • (string) get_partial (, ) Browse code

    Evaluates and returns a partial.

    The syntax is similar to the one of include_partial

    Example:

    echo get_partial('mypartial', array('myvar' => 12345));

    returns result of the partial execution

  • (string) get_slot () Browse code

    Evaluates and returns a slot.


    Example:

    echo get_slot('navigation');

    returns content of the slot

  • (boolean) has_slot () Browse code

    Returns true if the slot exists.

    returns true, if the slot exists

  • (void) include_component (, , ) Browse code

    Evaluates and echoes a component.

    For a variable to be accessible to the component and its partial,
    it has to be passed in the third argument.

    Example:

    include_component('mymodule', 'mypartial', array('myvar' => 12345));

  • (void) include_component_slot (, ) Browse code

    Evaluates and echoes a component slot.

    The component name is deduced from the definition of the view.yml
    For a variable to be accessible to the component and its partial,
    it has to be passed in the second argument.

    Example:

    include_component_slot('sidebar', array('myvar' => 12345));

  • (void) include_partial (, ) Browse code

    Evaluates and echoes a partial.

    The partial name is composed as follows: 'mymodule/mypartial'.
    The partial file name is _mypartial.php and is looked for in modules/mymodule/templates/.
    If the partial name doesn't include a module name,
    then the partial file is searched for in the caller's template/ directory.
    If the module name is 'global', then the partial file is looked for in myapp/templates/.
    For a variable to be accessible to the partial, it has to be passed in the second argument.

    Example:

    include_partial('mypartial', array('myvar' => 12345));

  • (void) include_slot () Browse code

    Evaluates and echoes a slot.


    Example:

    include_slot('navigation');

  • (void) slot () Browse code

    Begins the capturing of the slot.

  • _get_cache () Browse code

  • _get_cache_key () Browse code

  • _get_cache_uri () Browse code

  • _set_cache () Browse code