This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var globalConfigs = { | |
env : '<?php echo sfConfig::get('sf_environment') ?>', | |
userCulture : '<?php echo $sf_user->getCulture() ?>', | |
urls: { | |
ajaxAutocomplete : '<?php echo url_for('@homepage') ?>', | |
ajaxModalBox : '<?php echo url_for('@homepage') ?>' | |
}, | |
i18n: { | |
example : "<?php echo esc_specialchars(__('example')) ?>", | |
exampleModalboxTitle : "<?php echo esc_specialchars(__('example_modalbox_title')) ?>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript_configs: | |
url: /js/configs.:sf_format | |
param: { module: js, action: configs, sf_format: js } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function configure() | |
{ | |
$this->dispatcher->connect('context.load_factories', array($this, 'listenToContextLoadFactoriesEvent')); | |
} | |
public function listenToContextLoadFactoriesEvent(sfEvent $event) | |
{ | |
$event->getSubject()->getResponse()->addJavascript($event->getSubject()->getRouting()->generate('javascript_configs')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// env condition: | |
if (globalConfigs.env == 'dev') {} | |
// jQuery DOM manipulation: | |
$('#example').html(globalConfigs.i18n.example); | |
// jQuery ajax call: | |
$.get(globalConfigs.urls.ajaxAutocomplete, function(data) {}); | |
// enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var globalConfigs = { | |
// ... | |
wysiwyg: { | |
script_url: '/js/tiny_mce/tiny_mce.js', | |
theme: "advanced", | |
element_format : "xhtml", | |
cleanup : true, | |
theme_advanced_buttons1: "<?php echo sfConfig::get('app_tinymce_theme_advanced_buttons1') ?>", | |
theme_advanced_buttons2: "<?php echo sfConfig::get('app_tinymce_theme_advanced_buttons2') ?>", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TinyMCE via jQuery plugin: | |
$('#wysiwyg').tinymce(globalConfigs.wysiwyg); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This file is part of the Symfony package. | |
* | |
* (c) Fabien Potencier <fabien@symfony.com> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_type: product | |
category_level0: Books | |
category_level1: Computers & Technology | |
category_level2: Network Programming | |
name: Pro AngularJS | |
--- | |
_type: product | |
category_level0: Books |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Form; | |
use AppBundle\Model\Username; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\DataMapperInterface; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\FormError; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Model; | |
interface UserRepository | |
{ | |
public function add(User $user); | |
public function remove(User $user); |
OlderNewer