GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
A manager of legacy global states and contexts. More...
Static Public Member Functions | |
static | freeze () |
Serializes the current configuration as needed. More... | |
static | load ( $configuration) |
Hydrates the legacy context globals as needed. More... | |
static | pop () |
Restores last saved state and context. More... | |
static | push ( $configuration) |
Set the state depending on the provided configuration. More... | |
static | reset () |
Resets the global state completely. More... | |
static | thaw ( $data) |
Deserializes a saved configuration. More... | |
Static Private Attributes | |
static | $stack = array() |
A manager of legacy global states and contexts.
Handles mocking of:
Allows us to set a specific state globally using the old containers, then reset it. Useful for legacy code that keeps on depending on these variables.
Some examples right now include template files, utility functions, some actions and filters that expect the old contexts to be set.
Definition at line 357 of file _mocks.php.
|
static |
Serializes the current configuration as needed.
Definition at line 419 of file _mocks.php.
References GravityView_frontend\getInstance(), GravityView_View_Data\getInstance(), and GravityView_View\getInstance().
|
static |
Hydrates the legacy context globals as needed.
{
Definition at line 552 of file _mocks.php.
References $gravityview_view, $value, endswitch, GravityView_View_Data\getInstance(), GravityView_View\getInstance(), gravityview(), and Shortcode\parse().
Referenced by Field_Template\render(), View_Table_Template\the_entry(), View_List_Template\the_field(), and View_Table_Template\the_field().
|
static |
Restores last saved state and context.
Definition at line 410 of file _mocks.php.
Referenced by Entry_Legacy_Template\render(), View_Legacy_Template\render(), and Edit_Entry_Renderer\render().
|
static |
Set the state depending on the provided configuration.
Saves current global state and context.
Configuration keys:
also:
and automagically:
array | $configuration | The configuration. |
Definition at line 400 of file _mocks.php.
Referenced by Entry_Legacy_Template\render(), View_Legacy_Template\render(), Entry_Renderer\render(), Edit_Entry_Renderer\render(), and Legacy_Override_Template\render().
|
static |
Resets the global state completely.
Use with utmost care, as filter and action callbacks may be added again.
Does not touch the context stack.
Definition at line 680 of file _mocks.php.
References $class, GravityView_View_Data\$instance, GravityView_frontend\$instance, GravityView_View\$instance, foreach, and gravityview().
|
static |
Deserializes a saved configuration.
Modifies the global state.
array | $data | Saved configuration from self::freeze() |
Definition at line 457 of file _mocks.php.
References $value, endswitch, GravityView_frontend\getInstance(), GravityView_View_Data\getInstance(), and GravityView_View\getInstance().
|
staticprivate |
Definition at line 358 of file _mocks.php.