Skip to content

Instantly share code, notes, and snippets.

View mockiemockiz's full-sized avatar

muhamad rifki mockiemockiz

View GitHub Profile
<?php
/**
* Created by PhpStorm.
* User: mockie
* Date: 11/27/14
* Time: 10:09 AM
*/
namespace Mockizart\Bundle\BlogBundle\Service\Entity;
<?php
/**
* Created by PhpStorm.
* User: mockie
* Date: 11/27/14
* Time: 10:09 AM
*/
namespace Mockizart\Bundle\BlogBundle\Service\Entity;
<?php
namespace Mockizart\Bundle\BlogBundle\Controller;
use Mockizart\Bundle\BlogBundle\MockizartBlogBundle;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Mockizart\Bundle\BlogBundle\Entity\MockblogTag;
use Mockizart\Bundle\BlogBundle\Form\MockblogTagType;
<?php
// module/User/src/User/View/Helper/Hellohelper.php
/**
* Created by PhpStorm.
* User: mockie
* Date: 11/8/14
* Time: 5:33 AM
*/
public function updateProfileAction()
{
$authorize = $this->getServiceLocator()->get('BjyAuthorize\Provider\Identity\ProviderInterface');
$roles = $authorize->getIdentityRoles();
Debug::dump($this->ZfcUserAuthentication()->hasIdentity());
// Debug::dump($roles);
die;
}
object(Zend\Paginator\Paginator)#492 (11) {
["cacheEnabled":protected] => bool(true)
["adapter":protected] => object(DoctrineORMModule\Paginator\Adapter\DoctrinePaginator)#483 (1) {
["paginator":protected] => object(Doctrine\ORM\Tools\Pagination\Paginator)#489 (4) {
["query":"Doctrine\ORM\Tools\Pagination\Paginator":private] => object(Doctrine\ORM\Query)#504 (17) {
["_state":"Doctrine\ORM\Query":private] => int(2)
["_dql":"Doctrine\ORM\Query":private] => string(120) "SELECT UserCountry FROM UserDetail\Entity\UserCountry UserCountry WHERE UserCountry.code='IDN' GROUP BY UserCountry.code"
["_parserResult":"Doctrine\ORM\Query":private] => NULL
["_firstResult":"Doctrine\ORM\Query":private] => NULL
["_maxResults":"Doctrine\ORM\Query":private] => NULL
<?php
public function indexAction()
{
$repository = $this->em->getRepository('UserDetail\Entity\UserCountry');
$adapter = new DoctrineAdapter(
new ORMPaginator(
$repository->createQueryBuilder('UserCountry')
->where('UserCountry.code=\'IDN\'')
->groupBy('UserCountry.code')
$paginator = $this->getPropertyTable()->exploreProperty($cond);
$paginator->setCurrentPageNumber((int)$this->params()->fromQuery('page', 1));
$paginator->setItemCountPerPage(2);
return array('paginator' => $paginator);
<?php
/**
* Created by PhpStorm.
* User: mockie
* Date: 5/19/14
* Time: 7:54 PM
*/
namespace Property\Model;
<?php
/**
* Created by PhpStorm.
* User: mockie
* Date: 5/10/14
* Time: 9:00 PM
*/
namespace User\Model;