This file contains hidden or 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
The Authentication <li><a which toc.phtml looks for is split across lines and | |
not found by the non-css preg selector. | |
This section of TOC.md | |
Authentication and Authorization | |
-------------------------------- | |
- [Introduction](/auth/intro.md) | |
- [Authentication](/auth/authentication.md) |
This file contains hidden or 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 function cannot return an accurate answer | |
function isAllyByCrosscheckIdenties($person) | |
{ | |
// If this person identifies as any of the following | |
// make assumption they support equal rights for everyone | |
foreach ($person->getSexualIdentities() as $identity) { | |
switch ($identity) { | |
case 'gay': | |
case 'lesbian': | |
case 'bisexual': |
This file contains hidden or 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
<?php | |
// Step 1: create form through annotations | |
$test = new TestEntity(); | |
$builder = new AnnotationBuilder(); | |
$form = $builder->createForm($test); | |
$viewModel = new ViewModel(); | |
// Step 2: populate select elements |
This file contains hidden or 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
<?php | |
namespace DbLoadCd\Entity; | |
use Zend\Form\Annotation as Form; | |
use Zend\InputFilter\InputFilter; | |
use Doctrine\ORM\Event\LifecycleEventArgs; | |
/** | |
* @Form\Hydrator("Zend\Stdlib\Hydrator\ObjectProperty") |
This file contains hidden or 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
<?php | |
namespace Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\ViewModel; | |
use Zend\Form\Annotation\AnnotationBuilder; | |
use DbLoadCd\Entity\Test as TestEntity; | |
use Application\Service\Security; |
This file contains hidden or 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
if ($form->isValid()) { | |
$data = $form->getData(); | |
$data['project'] = $project; | |
$data['owner'] = $em->getRepository('AppleConnect\Entity\User')->find($data['owner']); | |
$data['operator'] = $em->getRepository('AppleConnect\Entity\User')->find($data['operator']); | |
$test->exchangeArray($data); |
This file contains hidden or 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
$builder = new AnnotationBuilder(); | |
$form = $builder->createForm($test); | |
... | |
$form->get('testResult')->setValueOptions( | |
$this->doctrineSelectOptions( | |
'DbLoadCd\Entity\TestResult', | |
[], | |
['name' => 'ASC'], | |
['Application\Service\Security', 'view'] | |
) |
This file contains hidden or 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
public function init(ModuleManager $moduleManager) | |
{ | |
$this->getEventManager()->getSharedManager()->attach( | |
array('Zend\Mvc\Application'), // context | |
array(MvcEvent::EVENT_DISPATCH), // event 'dispatch' | |
array($this, 'checkSession') // callback | |
); | |
} |
This file contains hidden or 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
<?php | |
namespace Db\Form\InputFilter; | |
trait Field | |
{ | |
abstract public function inputFilterInput(); | |
} | |
This file contains hidden or 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
public function infiniteScroll($page) { | |
$view = $this->getServiceLocator()->get('View'); | |
$model = new ViewModel(); | |
$model->setTemplate('scripts/infinite-scroll/main.phtml'); | |
$model->setVariable('page', $page); | |
$model->setOption('has_parent', true); | |
return $view->render($model); | |
} |