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 | |
class ManyToManyTest extends \PHPUnit_Framework_TestCase | |
{ | |
public function testSynchronization() | |
{ | |
$post = new Post(); | |
$tag = new Tag(); | |
$post->addTag($tag); |
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
// Make sure that autopager plugin is loaded | |
if ($.autopager) { | |
if (!autopager_was_initialised) { | |
autopager_was_initialised = true; | |
var container = '#courses div.content'; | |
var items_selector = container + ' > .course'; | |
var pager_selector = container + ' > div.item-list ul.pager'; | |
var next_selector = container + ' ' + 'li.pager-next a:first'; | |
var img = '<div id="autopager-ajax-loader"><div class="ajax-loader"></div></div>'; | |
$(pager_selector).hide(); |
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 | |
class DomainToDTOMapper | |
{ | |
public static function map(\Dto &$dto,\Domain $domain) { | |
foreach($dto as &$property) { | |
$property = call_user_func(array($domain, 'get' . ucfirst($property)); | |
} | |
} | |
} |
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 Anyt\BlogBundle\Entity; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Post | |
* |
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 Anyt\BlogBundle\Twig; | |
class MaxTaggedPostsCountExtension extends \Twig_Extension | |
{ | |
public function getFunctions() | |
{ | |
return array( | |
new Twig_SimpleFunction('getTagWeight', 'getTagWeight'), |
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
doctrine: | |
orm: | |
naming_strategy: doctrine.orm.naming_strategy.underscore |
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 | |
require 'vendor/autoload.php'; | |
// Create the mail transport configuration | |
$transport = Swift_MailTransport::newInstance(); | |
// Create the message | |
$message = Swift_Message::newInstance(); | |
$message->setTo(array( |
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
"repositories": [ | |
{ | |
"type": "package", | |
"package": { | |
"name": "jquery/jquery", | |
"version": "1.10.2", | |
"dist": { | |
"url": "http://code.jquery.com/jquery-1.10.2.js", | |
"type": "file" | |
} |
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
// примеры команд, которые выполняются при успешном сабмите формы | |
$.ajaxFormCommands = { | |
redirect: function (target) { | |
window.location.href = target; | |
}, | |
reload: function () { | |
location.reload(); | |
}, | |
replace: function (newContent, target) { |
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
"repositories": [ | |
{ | |
"type":"package", | |
"package": { | |
"name": "l3pp4rd/doctrine-extensions", | |
"version":"master", | |
"source": { | |
"url": "https://github.com/l3pp4rd/DoctrineExtensions.git", | |
"type": "git", | |
"reference":"master" |
OlderNewer