Skip to content

Instantly share code, notes, and snippets.

@leup
leup / ExFormElement.php
Created November 19, 2012 21:16
Custom Form Elements and View Helpers for Zend Framework 2
<?php
namespace Admin\Form\View\Helper;
use Zend\Form\ElementInterface;
use Zend\Form\View\Helper\FormElement;
class ExFormElement extends FormElement
{
/**
@leup
leup / Image.php
Last active December 15, 2015 13:09
class Image extends \Zend\Form\Element\File implements ExFormElementInterface
{
public function getInputSpecification() {
$specs = parent::getInputSpecification();
if (!isset($specs['filters']) || !is_array($specs['filters'])) {
$specs['filters'] = array();
}
$specs['filters'][] = array(
'name' => 'thumbnailfilter'
);
<?php
function laf_woocommerce_checkout_update_order_review($post_data)
{
if (!empty($post_data)) {
parse_str($post_data, $data);
}
else
return false;