for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class ChangePasswordExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
{
public function Init()
$this->addHook('main.fabrica', 'MainFabrica');
}
/**
* @param string $sName
* @param mixed $oProvider
*/
public function MainFabrica($sName, &$oProvider)
switch ($sName)
case 'change-password':
include_once __DIR__.'/ChangePasswordExampleDriver.php';
$oProvider = new ChangePasswordExampleDriver();
$oProvider->SetAllowedEmails(\strtolower(\trim($this->Config()->Get('plugin', 'allowed_emails', ''))));
break;
* @return array
public function configMapping()
return array(
\RainLoop\Plugins\Property::NewInstance('allowed_emails')->SetLabel('Allowed emails')
->SetType(\RainLoop\Enumerations\PluginPropertyType::STRING_TEXT)
->SetDescription('Allowed emails, space as delimiter, wildcard supported. Example: [email protected] [email protected] *@domain2.net')
->SetDefaultValue('*')
);