From dd4d9e9ed1ad09920f6d2b73df20a1f327b7c8fd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 26 May 2016 18:24:51 +0100 Subject: [PATCH] Removed AppBundle --- app/SculpinKernel.php | 1 - app/config/sculpin_kernel.yml | 1 + composer.json | 5 -- src/AppBundle/AppBundle.php | 9 ---- .../DependencyInjection/AppExtension.php | 20 -------- src/AppBundle/Resources/config/services.yml | 17 ------- src/AppBundle/Twig/SpeakerDeckExtension.php | 39 --------------- src/AppBundle/Twig/TweetExtension.php | 46 ------------------ src/AppBundle/Twig/VimeoExtension.php | 43 ----------------- src/AppBundle/Twig/YouTubeExtension.php | 48 ------------------- 10 files changed, 1 insertion(+), 228 deletions(-) delete mode 100644 src/AppBundle/AppBundle.php delete mode 100644 src/AppBundle/DependencyInjection/AppExtension.php delete mode 100644 src/AppBundle/Resources/config/services.yml delete mode 100644 src/AppBundle/Twig/SpeakerDeckExtension.php delete mode 100644 src/AppBundle/Twig/TweetExtension.php delete mode 100644 src/AppBundle/Twig/VimeoExtension.php delete mode 100644 src/AppBundle/Twig/YouTubeExtension.php diff --git a/app/SculpinKernel.php b/app/SculpinKernel.php index 7f4f8c29a..b15e025ba 100644 --- a/app/SculpinKernel.php +++ b/app/SculpinKernel.php @@ -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' ]; } } diff --git a/app/config/sculpin_kernel.yml b/app/config/sculpin_kernel.yml index d25c4c3b3..316a1336a 100644 --- a/app/config/sculpin_kernel.yml +++ b/app/config/sculpin_kernel.yml @@ -1,6 +1,7 @@ sculpin: ignore: - 'assets/images/*/originals/*' + sculpin_content_types: posts: permalink: blog/:slug_title/ diff --git a/composer.json b/composer.json index 2eeff4254..46431b6c5 100644 --- a/composer.json +++ b/composer.json @@ -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" - } } } diff --git a/src/AppBundle/AppBundle.php b/src/AppBundle/AppBundle.php deleted file mode 100644 index 05123b678..000000000 --- a/src/AppBundle/AppBundle.php +++ /dev/null @@ -1,9 +0,0 @@ -load('services.yml'); - } -} diff --git a/src/AppBundle/Resources/config/services.yml b/src/AppBundle/Resources/config/services.yml deleted file mode 100644 index 93a6dd689..000000000 --- a/src/AppBundle/Resources/config/services.yml +++ /dev/null @@ -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 } diff --git a/src/AppBundle/Twig/SpeakerDeckExtension.php b/src/AppBundle/Twig/SpeakerDeckExtension.php deleted file mode 100644 index f443a088a..000000000 --- a/src/AppBundle/Twig/SpeakerDeckExtension.php +++ /dev/null @@ -1,39 +0,0 @@ - ['html'] - ]), - ]; - } - - public function embedCode($dataId, $dataRatio) - { - return sprintf( - '', - $dataId, - $dataRatio - ); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'speakerdeck'; - } - -} diff --git a/src/AppBundle/Twig/TweetExtension.php b/src/AppBundle/Twig/TweetExtension.php deleted file mode 100644 index a4c70eb47..000000000 --- a/src/AppBundle/Twig/TweetExtension.php +++ /dev/null @@ -1,46 +0,0 @@ - ['html'] - ]), - ]; - } - - /** - * Render a tweet. - * - * @param string $tweet - * The content of the tweet. - * - * @return string - */ - public function render($tweet) - { - return sprintf( - '

%s

', - $tweet - ); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'tweet'; - } - -} diff --git a/src/AppBundle/Twig/VimeoExtension.php b/src/AppBundle/Twig/VimeoExtension.php deleted file mode 100644 index fb974085f..000000000 --- a/src/AppBundle/Twig/VimeoExtension.php +++ /dev/null @@ -1,43 +0,0 @@ - ['html'] - ]) - ]; - } - - /** - * Generates the embed code for a video. - * - * @param $videoId - * The ID of the video. - * - * @return string - */ - public function embedCode($videoId) - { - return sprintf( - '', - $videoId - ); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'vimeo'; - } - -} diff --git a/src/AppBundle/Twig/YouTubeExtension.php b/src/AppBundle/Twig/YouTubeExtension.php deleted file mode 100644 index f55e615d0..000000000 --- a/src/AppBundle/Twig/YouTubeExtension.php +++ /dev/null @@ -1,48 +0,0 @@ - ['html'] - ]) - ]; - } - - /** - * Generates the embed code for a video. - * - * @param $videoId - * The ID of the video. - * - * @return string - */ - public function embedCode($videoId) - { - return sprintf( - '
- -
', - $videoId - ); - } - - /** - * {@inheritdoc} - */ - public function getName() - { - return 'youtube'; - } - -}