This file contains 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 | |
... | |
/* | |
* | |
* Option tests below here. | |
* | |
* | |
*/ |
This file contains 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
/* | |
* @province <select> element with opgtroups of provinces separated by country | |
* @country <select> element | |
*/ | |
function countryProvinces(province, country) | |
{ | |
//zf2 select options dont allow non-standard attributes.. hooray. | |
opts = $(province).children('optgroup').each(function(){ | |
$(this).attr('data-country_code', $(this).children().val().substring(0,2)); | |
}); |
This file contains 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
(function($) { | |
function countryProvinces(province, country) | |
{ | |
//zf2 select options dont allow non-standard attributes.. hooray. | |
opts = $(province).children('optgroup').each(function(){ | |
$(this).attr('data-country_code', $(this).children().val().substring(0,2)); | |
}); | |
$(province).data('options', opts); | |
$(province).children('optgroup').remove(); |
This file contains 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
function filterProvinces(element, countryCode) { | |
$(element).val(0); | |
optGroups = $(element).data('options'); | |
$(optGroups).each(function(){ | |
var match = false | |
if ($(this).data('country_code') == countryCode) { | |
$(element).append($(this)); | |
} | |
}) | |
$(element).find('optgroup').remove(); |
This file contains 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
function filterProvinces(element, countryCode) { | |
$(element).val(0); | |
$(element).find('optgroup').remove(); | |
options = $(element).data('options'); | |
//need to get the maching option by countrycode (id) | |
//$(element).append(html); | |
} | |
$(document).ready(function(){ |
This file contains 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
protected function triggerListeners($event, EventInterface $e, $callback = null) | |
{ | |
$responses = new ResponseCollection; | |
$listeners = $this->getListeners($event); | |
// Add shared/wildcard listeners to the list of listeners, | |
// but don't modify the listeners object | |
$sharedListeners = $this->getSharedListeners($event); | |
$sharedWildcardListeners = $this->getSharedListeners('*'); |
This file contains 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 | |
/** | |
* This makes our life easier when dealing with paths. Everything is relative | |
* to the application root now. | |
*/ | |
chdir(dirname(__DIR__)); | |
// Setup autoloading | |
include 'init_autoloader.php'; |
This file contains 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
array(1) { | |
'routes' => | |
array(19) { | |
'home' => | |
array(2) { | |
'type' => | |
string(28) "Zend\Mvc\Router\Http\Literal" | |
'options' => | |
array(2) { | |
'route' => |
This file contains 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
array(1) { | |
'routes' => | |
array(19) { | |
'home' => | |
array(2) { | |
'type' => | |
string(28) "Zend\Mvc\Router\Http\Literal" | |
'options' => | |
array(2) { | |
'route' => |
This file contains 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 Market\Factory; | |
use Market\Controller\PostController; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class PostControllerFactory implements FactoryInterface | |
{ |