Removed AppBundle
This commit is contained in:
parent
575dea5e7f
commit
dd4d9e9ed1
|
@ -16,7 +16,6 @@ class SculpinKernel extends AbstractKernel
|
|||
'Tsphethean\Sculpin\Bundle\RelatedPostsBundle\SculpinRelatedPostsBundle',
|
||||
'Opdavies\Sculpin\Bundle\ContentGeneratorBundle\SculpinContentGeneratorBundle',
|
||||
'Opdavies\Sculpin\Bundle\GistEmbedBundle\SculpinGistEmbedBundle',
|
||||
'AppBundle\AppBundle'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
sculpin:
|
||||
ignore:
|
||||
- 'assets/images/*/originals/*'
|
||||
|
||||
sculpin_content_types:
|
||||
posts:
|
||||
permalink: blog/:slug_title/
|
||||
|
|
|
@ -21,10 +21,5 @@
|
|||
"behat/mink-goutte-driver": "*",
|
||||
"opdavies/sculpin-content-generator-bundle": "@stable",
|
||||
"opdavies/sculpin-gist-embed-bundle": "dev-master"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"AppBundle\\": "src/AppBundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class AppBundle extends Bundle
|
||||
{
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
|
||||
class AppExtension extends Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
services:
|
||||
app.twig.speakerdeck:
|
||||
class: AppBundle\Twig\SpeakerDeckExtension
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
app.twig.tweet:
|
||||
class: AppBundle\Twig\TweetExtension
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
app.twig.vimeo:
|
||||
class: AppBundle\Twig\VimeoExtension
|
||||
tags:
|
||||
- { name: twig.extension }
|
||||
app.twig.youtube:
|
||||
class: AppBundle\Twig\YouTubeExtension
|
||||
tags:
|
||||
- { name: twig.extension }
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle\Twig;
|
||||
|
||||
use Twig_Extension;
|
||||
use Twig_SimpleFunction;
|
||||
|
||||
class SpeakerDeckExtension extends Twig_Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('speakerdeck', [$this, 'embedCode'], [
|
||||
'is_safe' => ['html']
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
public function embedCode($dataId, $dataRatio)
|
||||
{
|
||||
return sprintf(
|
||||
'<script async class="speakerdeck-embed" data-id="%s" data-ratio="%s" src="//speakerdeck.com/assets/embed.js"></script>',
|
||||
$dataId,
|
||||
$dataRatio
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'speakerdeck';
|
||||
}
|
||||
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle\Twig;
|
||||
|
||||
use Twig_Extension;
|
||||
use Twig_SimpleFunction;
|
||||
|
||||
class TweetExtension extends Twig_Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('tweet', [$this, 'render'], [
|
||||
'is_safe' => ['html']
|
||||
]),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a tweet.
|
||||
*
|
||||
* @param string $tweet
|
||||
* The content of the tweet.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render($tweet)
|
||||
{
|
||||
return sprintf(
|
||||
'<blockquote class="twitter-tweet" lang="en"><p lang="en" dir="ltr">%s</blockquote>',
|
||||
$tweet
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'tweet';
|
||||
}
|
||||
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle\Twig;
|
||||
|
||||
use Twig_Extension;
|
||||
use Twig_SimpleFunction;
|
||||
|
||||
class VimeoExtension extends Twig_Extension
|
||||
{
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('vimeo', [$this, 'embedCode'], [
|
||||
'is_safe' => ['html']
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the embed code for a video.
|
||||
*
|
||||
* @param $videoId
|
||||
* The ID of the video.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function embedCode($videoId)
|
||||
{
|
||||
return sprintf(
|
||||
'<iframe src="https://player.vimeo.com/video/%s?title=0&portrait=0" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',
|
||||
$videoId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'vimeo';
|
||||
}
|
||||
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace AppBundle\Twig;
|
||||
|
||||
use Twig_Extension;
|
||||
use Twig_SimpleFunction;
|
||||
|
||||
class YouTubeExtension extends Twig_Extension
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getFunctions()
|
||||
{
|
||||
return [
|
||||
new Twig_SimpleFunction('youtube', [$this, 'embedCode'], [
|
||||
'is_safe' => ['html']
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the embed code for a video.
|
||||
*
|
||||
* @param $videoId
|
||||
* The ID of the video.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function embedCode($videoId)
|
||||
{
|
||||
return sprintf(
|
||||
'<div class="embed-container">
|
||||
<iframe src="https://www.youtube.com/embed/%s" frameborder="0" allowfullscreen></iframe>
|
||||
</div>',
|
||||
$videoId
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return 'youtube';
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue