This file contains hidden or 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
Sonata Media Bundle | |
=================== | |
Media path generation: http://mycdn.com/context/01223/023/thumb_1232_small.jpg | |
1. CDN http://mycdn.com | |
2. Path Generator : context/01223/023 | |
3. Thumbnail - internal generation: thumb_1232_small.jpg | |
4. Thumbnail - return the relative path: context/01223/023/thumb_1232_small.jpg |
This file contains hidden or 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 Sonata project. | |
* | |
* (c) Thomas Rabaix <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains hidden or 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 Sonata\Bundle\ScreenyBundle\Consumer; | |
use Sonata\Bundle\ScreenyBundle\Screeny\UrlShotManager; | |
use PhpAmqpLib\Message\AMQPMessage; | |
use OldSound\RabbitMqBundle\RabbitMq\Producer; | |
class UrlShotConsumer | |
{ |
This file contains hidden or 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 check prevents access to debug front controllers that are deployed by accident to production servers. | |
// feel free to remove this, extend it, or make something more sophisticated. | |
if (!in_array(@$_SERVER['REMOTE_ADDR'], array( | |
'127.0.0.1', | |
'::1', | |
'84.14.82.2', | |
'88.175.92.100', | |
))) { |
This file contains hidden or 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
diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | |
index 2cad8a4..51c4924 100644 | |
--- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | |
+++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | |
@@ -127,6 +127,16 @@ class XmlExporter extends AbstractExporter | |
} | |
} | |
+ foreach ($metadata->associationMappings as $name => $field) { | |
+ if (isset($field['id']) && $field['id']) { |
This file contains hidden or 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
assetic: | |
debug: false | |
use_controller: false | |
read_from: %kernel.root_dir%/../web | |
write_to: %kernel.root_dir%/../web | |
dump_on_warmup: false # do not compile on cache warmup | |
bundles: [] # disable bundles parsing | |
filters: | |
yui_js: |
This file contains hidden or 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 | |
// service | |
interface BlockExecuteFactoryInterface | |
{ | |
function getExecutionContext(BlockInterface $block); | |
} | |
// object, one per block | |
interface BlockExecutionContextInterface |
This file contains hidden or 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
/** | |
* {@inheritdoc} | |
*/ | |
public function getStatus() | |
{ | |
$states = $this->messageManager->countStates(); | |
if ($states[MessageInterface::STATE_OPEN] > $this->checkLevel[MessageInterface::STATE_OPEN]) { | |
return new BackendStatus(BackendStatus::CRITICAL, 'Too much messages waiting to be processed'); | |
} |
This file contains hidden or 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 | |
$media = new Media; | |
$media->setProviderName('sonata.media.provider.image'); | |
$media->setContext('default'); | |
$media->setBinaryContent('/path/to/file'); | |
$post = new Post; | |
$post->setMedia($media); |
This file contains hidden or 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->getSeoPage() | |
->setTitle($media->getName()) | |
->addMeta('property', 'og:description', $media->getDescription()) | |
->addMeta('property', 'og:type', 'video') | |
; |