Profile

Profile information

Arguments

$profile
profile id or name
Default: Current user profile

Example

Get profile name for current user:

$profileName = $this->get('profile')->getName();

Make profile specific actions

If profile name is 'client', set status as 'Ordered'.

if ( $this->get('profile')->isName('client') ){
    $Order->status->setValue('Ordered');
}

Full method list

Method return Description
getId() int Technical identification number.
getName() string Technical name.
getTitle() string Visible name.
getDescription() string Additional description.
getDocumentation() string Documentation text.
isId(val,..)  bool  Return TRUE, if profile ID is one of given values.
isName(val,...)  bool  Return TRUE, if profile name is one of given values.

if name is omitted, method returns the value of first profile variable.