parent
cd383e183c
commit
07a90bdfd9
@ -0,0 +1 @@ |
||||
{% extends 'ChamiloCoreBundle:Mailer/User:new_user.text.twig' %} |
@ -0,0 +1,22 @@ |
||||
{% set site_name = chamilo_settings_get('platform.site_name') %} |
||||
|
||||
{{ 'Dear' | trans }} {{ complete_user_name }}, |
||||
|
||||
{{ 'YouAreReg' | trans }} {{ site_name }} |
||||
|
||||
{{ 'WithTheFollowingSettings' | trans }} |
||||
|
||||
{{ 'Username' | trans }}: {{ login_name }} |
||||
{{ 'Password' | trans }}: {{ password }} |
||||
{{ 'Address' | trans }}: {{ site_name }} |
||||
{{ 'Is' | trans }} {{ url.url }} |
||||
|
||||
{{ 'Problem' | trans }} |
||||
{{ 'Formula' | trans }}, |
||||
|
||||
{{ chamilo_settings_get('platform.administrator_name') }} |
||||
{{ chamilo_settings_get('platform.administrator_surname') }} |
||||
|
||||
{{ 'Manager' | trans }} {{ site_name }} |
||||
{{ chamilo_settings_get('platform.administrator_phone') }} |
||||
{{ chamilo_settings_get('platform.administrator_email') }} |
@ -0,0 +1,17 @@ |
||||
<?php |
||||
|
||||
namespace Chamilo\SettingsBundle\Templating\Helper; |
||||
|
||||
use Sylius\Bundle\SettingsBundle\Templating\Helper\SettingsHelper as |
||||
SyliusHelper; |
||||
|
||||
class SettingsHelper extends SyliusHelper |
||||
{ |
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return 'chamilo_settings'; |
||||
} |
||||
} |
@ -0,0 +1,71 @@ |
||||
<?php |
||||
|
||||
namespace Chamilo\SettingsBundle\Twig; |
||||
|
||||
use Sylius\Bundle\SettingsBundle\Templating\Helper\SettingsHelper; |
||||
|
||||
/** |
||||
* Sylius settings extension for Twig. |
||||
* |
||||
* @author Paweł Jędrzejewski <pawel@sylius.org> |
||||
*/ |
||||
class SettingsExtension extends \Twig_Extension |
||||
{ |
||||
/** |
||||
* @var SettingsHelper |
||||
*/ |
||||
private $helper; |
||||
|
||||
/** |
||||
* @param SettingsHelper $helper |
||||
*/ |
||||
public function __construct(SettingsHelper $helper) |
||||
{ |
||||
$this->helper = $helper; |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getFunctions() |
||||
{ |
||||
return array( |
||||
new \Twig_SimpleFunction('chamilo_settings_all', array($this, |
||||
'getSettings')), |
||||
new \Twig_SimpleFunction('chamilo_settings_get', array($this, |
||||
'getSettingsParameter')), |
||||
); |
||||
} |
||||
|
||||
/** |
||||
* Load settings from given namespace. |
||||
* |
||||
* @param string $namespace |
||||
* |
||||
* @return array |
||||
*/ |
||||
public function getSettings($namespace) |
||||
{ |
||||
return $this->helper->getSettings($namespace); |
||||
} |
||||
|
||||
/** |
||||
* Load settings parameter for given namespace and name. |
||||
* |
||||
* @param string $name |
||||
* |
||||
* @return mixed |
||||
*/ |
||||
public function getSettingsParameter($name) |
||||
{ |
||||
return $this->helper->getSettingsParameter($name); |
||||
} |
||||
|
||||
/** |
||||
* {@inheritdoc} |
||||
*/ |
||||
public function getName() |
||||
{ |
||||
return 'chamilo_settings'; |
||||
} |
||||
} |
Loading…
Reference in new issue