2017 © Pedro Peláez
 

package core-bundle

This is a Symfony Bundle compatible with Symfony 2.6+ which provides several features we consider core here at Sideclick.

image

sideclick/core-bundle

This is a Symfony Bundle compatible with Symfony 2.6+ which provides several features we consider core here at Sideclick.

  • Friday, January 6, 2017
  • by RowanReid
  • Repository
  • 1 Watchers
  • 2 Stars
  • 167 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Sideclick CoreBundle

This is a Symfony Bundle compatible with Symfony 2.6+ which provides several features which are commonly required in Symfony projects., (*1)

Installation

Step 1: Add the following to the "require" section of composer.json

"sideclick/core-bundle": "dev-master"

Step 2: Enable the bundle

Enable the bundle in the kernel:, (*2)

``` php <?php // app/AppKernel.php, (*3)

public function registerBundles() { $bundles = array( // ... new Sideclick\CoreBundle\SideclickCoreBundle(), ); }, (*4)

### Step 3: Install additional Bundles

This Bundle requires that other bundles be installed and configured, these are:
- https://github.com/dustin10/VichUploaderBundle
- https://github.com/FriendsOfSymfony/FOSMessageBundle (Note that when installing this, you do not need to perform the steps named "Step 2 - Setting up your user class" and "Step 3 - Set up FOSMessageBundle's models", this has already been done in the ScCoreBundle

#### Step 3.1 Configuring FOSMessageBundle

When configuring FOSMessageBundle, start with this:

``` yaml
fos_message:
    db_driver: orm
    thread_class: Sc\CoreBundle\Entity\Thread
    message_class: Sc\CoreBundle\Entity\Message

You will need to install and configure these before being able to use this Bundle., (*5)

Features

1. Entity Helpers

Entity helper classes should be defined in the /Entity/Helper directory, here is the basic structure of an Entity Helper class for an entity named 'User':, (*6)

``` php <?php //Sideclick\CoreBundle\Entity\Helper\UserHelper.php, (*7)

namespace Sideclick\CoreBundle\Entity\Helper;, (*8)

use Sideclick\CoreBundle\Entity\Helper\HelperAbstract; use Sideclick\CoreBundle\Entity\User;, (*9)

class UserHelper extends HelperAbstract { protected $_user;, (*10)

public function setUser(User $user)
{
    $this->_user = $user;
}

}, (*11)


There is a service named sc_core.entity_helper_factory which makes it easy to get an instance of an Entity Helper for an object, for example, in your controller you could do: ``` php $userHelper = $this->get('sc_core.entity_helper_factory')->getEntityHelper($user);

Also, there is a twig function to get a helper in your templates:, (*12)

twig get_entity_helper(user), (*13)

More documentation to come..., (*14)

The Versions

06/01 2017

dev-master

9999999-dev

This is a Symfony Bundle compatible with Symfony 2.6+ which provides several features we consider core here at Sideclick.

  Sources   Download

MIT

The Requires

 

by Rowan Reid

06/01 2017

0.2

0.2.0.0

This is a Symfony Bundle compatible with Symfony 2.6+ which provides several features we consider core here at Sideclick.

  Sources   Download

MIT

The Requires

 

by Rowan Reid

06/01 2017

0.1

0.1.0.0

This is a Symfony Bundle compatible with Symfony 2.6+ which provides several features we consider core here at Sideclick.

  Sources   Download

MIT

The Requires

 

by Rowan Reid