Flarum\Event\ConfigureUserPreferences::add PHP Method

add() public method

public add ( $key, callable $transformer = null, $default = null )
$transformer callable
    public function add($key, callable $transformer = null, $default = null)
    {
        User::addPreference($key, $transformer, $default);
    }

Usage Example

Esempio n. 1
0
 /**
  * @param ConfigureUserPreferences $event
  */
 public function configureUserPreferences(ConfigureUserPreferences $event)
 {
     $event->add('discloseOnline', 'boolval', true);
     $event->add('indexProfile', 'boolval', true);
     $event->add('locale');
 }
All Usage Examples Of Flarum\Event\ConfigureUserPreferences::add
ConfigureUserPreferences