Documentation

CRM_Iframe_ExtensionUtil
in package

The ExtensionUtil class provides small stubs for accessing resources of this extension.

Table of Contents

Constants

CLASS_PREFIX  = 'CRM_Iframe'
LONG_NAME  = 'iframe'
SHORT_NAME  = 'iframe'

Methods

findClass()  : string
Get the name of a class within this extension.
path()  : string
Get the path of a resource file (in this extension).
ts()  : string
Translate a string using the extension's domain.
url()  : string
Get the URL of a resource file (in this extension).

Constants

Methods

findClass()

Get the name of a class within this extension.

public static findClass(string $suffix) : string
Parameters
$suffix : string

Ex: 'Page_HelloWorld' or 'Page\HelloWorld'.

Return values
string

Ex: 'CRM_Foo_Page_HelloWorld'.

path()

Get the path of a resource file (in this extension).

public static path([string|null $file = NULL ]) : string
Parameters
$file : string|null = NULL

Ex: NULL. Ex: 'css/foo.css'.

Return values
string

Ex: '/var/www/example.org/sites/default/ext/org.example.foo'. Ex: '/var/www/example.org/sites/default/ext/org.example.foo/css/foo.css'.

ts()

Translate a string using the extension's domain.

public static ts(string $text[, array<string|int, mixed> $params = [] ]) : string

If the extension doesn't have a specific translation for the string, fallback to the default translations.

Parameters
$text : string

Canonical message text (generally en_US).

$params : array<string|int, mixed> = []
Tags
see
ts
Return values
string

Translated text.

url()

Get the URL of a resource file (in this extension).

public static url([string|null $file = NULL ]) : string
Parameters
$file : string|null = NULL

Ex: NULL. Ex: 'css/foo.css'.

Return values
string

Ex: 'http://example.org/sites/default/ext/org.example.foo'. Ex: 'http://example.org/sites/default/ext/org.example.foo/css/foo.css'.


        
On this page

Search results