Skip to content

Instantly share code, notes, and snippets.

/**
* Handles errors during dispatch
*
* @param \Zend\Mvc\MvcEvent $e
*/
public function onDispatchError(MvcEvent $e)
{
$exception = $e->getParam('exception');
// Not an exception causing this.
<?php
/**
* @author Antoine Hedgecock <[email protected]>
* @author Jonas Eriksson <[email protected]>
*
* @copyright PMG Media Group AB
*/
namespace Acl;
'factories' => array(
'navigation' => function($sm) {
$navigation = $sm->get('Zend\View\Helper\Navigation');
$navigation->setAcl($sm->getServiceLocator()->get('acl'));
$navigation->setRole($sm->getServiceLocator()->get('user_service_auth')->getIdentity()->getRole());
return $navigation;
}
'search' => array(
'type' => 'Segment',
'options' => array(
'route' => '/search',
'defaults' => array(
'controller' => 'domain.api',
'action' => 'search',
load: lang.hitch(this, function(data) {
if (data.whois == null) {
data.whois = 'An error occurred';
}
this.containerNode.innerHTML = '<pre>' + data.whois + '</pre>';
show: function()
{
var domains = this.grid.getSelectedDomains();
var first = undefined, size = 0;
for (var i in domains) {
if (domains.hasOwnProperty(i) && typeof(i) !== 'function') {
if (first == undefined) {
<?php
/**
* @author Antoine Hedgecock <[email protected]>
* @author Jonas Eriksson <[email protected]>
*
* @copyright PMG Media Group AB
*/
namespace Domain\Entity;
<?php
/**
* @author Antoine Hedgecock <[email protected]>
* @author Jonas Eriksson <[email protected]>
*
* @copyright PMG Media Group AB
*/
namespace Domain\Entity\ServiceConfiguration;
<?php
/**
* @author ANtoine Hedgecock <[email protected]
*/
namespace MCN\Controller;
use JsonSerializable;
use Zend\Mvc\MvcEvent;
// account status
$form->add(array(
'name' => 'enabled',
'type' => 'Zend\Form\Element\Select',
'options' => array(
'value_options' => array(
0 => 'Disabled',
1 => 'Enabled'