Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebca80b
commit 46a54dd
Showing
28 changed files
with
708 additions
and
41 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% if not post.tags.empty %} | ||
<p class="post-tags"> | ||
{% for tag in post.tags %} | ||
<span class="label label-success"> | ||
<i class="fa fa-tag"></i> {{ tag.name }} | ||
</span> | ||
{% endfor %} | ||
</p> | ||
{% endif %} | ||
|
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?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. | ||
*/ | ||
|
||
namespace AppBundle\DataFixtures\ORM; | ||
|
||
use AppBundle\Entity\Tag; | ||
use Doctrine\Common\DataFixtures\AbstractFixture; | ||
use Doctrine\Common\Persistence\ObjectManager; | ||
|
||
/** | ||
* Defines the sample data to load in the database when running the unit and | ||
* functional tests. | ||
* | ||
* Execute this command to load the data: | ||
* | ||
* $ php bin/console doctrine:fixtures:load | ||
* | ||
* See http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html | ||
* | ||
* @author Yonel Ceruto <yonelceruto@gmail.com> | ||
*/ | ||
class TagFixtures extends AbstractFixture | ||
{ | ||
public static $names = [ | ||
'Lorem', | ||
'ipsum', | ||
'consectetur', | ||
'adipiscing', | ||
'incididunt', | ||
'labore', | ||
'voluptate', | ||
'dolore', | ||
'pariatur', | ||
]; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function load(ObjectManager $manager) | ||
{ | ||
foreach (self::$names as $index => $name) { | ||
$tag = new Tag(); | ||
$tag->setName($name); | ||
|
||
$manager->persist($tag); | ||
$this->addReference('tag-'.$index, $tag); | ||
} | ||
|
||
$manager->flush(); | ||
} | ||
} |
Oops, something went wrong.