Commit af71752c authored by Hermann Mayer's avatar Hermann Mayer
Browse files

Page Entity now uses Sluggable Doctrine Extension. Added a help popover...

Page Entity now uses Sluggable Doctrine Extension. Added a help popover (styled and configured in jity.js) to the slug field on the PageType.
parent 627cc4a2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ stof_doctrine_extensions:
    orm:
        default:
            sortable: true
            sluggable: true

# Swiftmailer Configuration
swiftmailer:

bin/regen-db.sh

0 → 100755
+12 −0
Original line number Diff line number Diff line
#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" && cd "${DIR}/.."

php app/console doctrine:database:drop --force
php app/console doctrine:database:create

php app/console doctrine:schema:create

yes | php app/console doctrine:fixtures:load

rm -rf app/cache/dev

deploy @ 8ff3c33d

Original line number Diff line number Diff line
Subproject commit 7bd58d17b9eb3e999c0376af18ff0438db251f3e
Subproject commit 8ff3c33d5f0f0bd24bdca9c7a62c78a4bf78de67
+0 −3
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ class LoadPageData extends AbstractFixture implements OrderedFixtureInterface
        // Build Home Page
        $home = new Page();
        $home
            ->setSlug('about')
            ->setTitle('Über mich')
            ->setContent('<img src="{{ asset("bundles/jityhomepage/img/myself-cc3-300px.png") }}" alt="" class="img-polaroid pull-left" />
Mein Name ist Hermann Mayer, ich wurde am 02. August im Jahre 1992 in Berlin geboren und bin
@@ -78,7 +77,6 @@ zusätzliche Arbeit bedeutet.
        // Build Impress Page
        $impress = new Page();
        $impress
            ->setSlug('impressum')
            ->setTitle('Impressum')
            ->setContent('')
            ->setCategory($this->getReference('default-category'))
@@ -96,7 +94,6 @@ zusätzliche Arbeit bedeutet.
        // Build Contact Page
        $contact = new Page();
        $contact
            ->setSlug('kontakt')
            ->setTitle('Kontakt')
            ->setContent('')
            ->setCategory($this->getReference('default-category'))
+10 −2
Original line number Diff line number Diff line
@@ -2,11 +2,17 @@

namespace Jity\HomepageBundle\Entity;

use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="page")
 * @ORM\Table(
 *      name="page",
 *      indexes={
 *          @ORM\Index(name="slug_idx", columns={"slug"})
 *      }
 * )
 */
class Page
{
@@ -18,7 +24,8 @@ class Page
    protected $id;

    /**
     * @ORM\Column(type="string", length=100, unique=true)
     * @Gedmo\Slug(fields={"title"})
     * @ORM\Column(type="string", length=200)
     */
    protected $slug;

@@ -287,3 +294,4 @@ class Page
        return $this->service;
    }
}
Loading