class OpenGraphMetaTestModule in Open Graph meta tags 7
Same name and namespace in other branches
- 6 tests/opengraph_meta_test_module/opengraph_meta_test_module.module \OpenGraphMetaTestModule
Hierarchy
- class \OpenGraphMetaTestModule
Expanded class hierarchy of OpenGraphMetaTestModule
1 string reference to 'OpenGraphMetaTestModule'
- opengraph_meta_test_module_og_tag_render_alter in tests/
opengraph_meta_test_module/ opengraph_meta_test_module.module - Implements hook_og_tag_render_alter().
File
- tests/
opengraph_meta_test_module/ opengraph_meta_test_module.module, line 18
View source
class OpenGraphMetaTestModule {
/** @var array result values for calls to hook_og_tag_render_alter. */
public static $og_tag_render_alter = array();
/**
* Implements hook_og_tag_render_alter().
*
* @param $node the node whose tag is being rendered.
* @param $name the name of the OG tag being rendered, e.g. title, image.
* @param $value the value of the OG tag being rendered.
*
* @return the altered value to render for the given tag.
*/
public static function hook_og_tag_render_alter($node, $name, $value) {
return !empty(self::$og_tag_render_alter[$name]) ? self::$og_tag_render_alter[$name] : $value;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OpenGraphMetaTestModule:: |
public static | property | @var array result values for calls to hook_og_tag_render_alter. | |
OpenGraphMetaTestModule:: |
public static | function | Implements hook_og_tag_render_alter(). |