PHP code example of sideclick / core-bundle

1. Go to this page and download the library: Download sideclick/core-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sideclick / core-bundle example snippets

 php

// app/AppKernel.php

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

//Sideclick\CoreBundle\Entity\Helper\UserHelper.php

namespace Sideclick\CoreBundle\Entity\Helper;

use Sideclick\CoreBundle\Entity\Helper\HelperAbstract;
use Sideclick\CoreBundle\Entity\User;

class UserHelper extends HelperAbstract
{
    protected $_user;

    public function setUser(User $user)
    {
        $this->_user = $user;
    }
    
}
 php
$userHelper = $this->get('sc_core.entity_helper_factory')->getEntityHelper($user);