Skip to content

Instantly share code, notes, and snippets.

View brookinsconsulting's full-sized avatar
😀
Creating NeXT Generation eZ Platform Software

Brookins Consulting brookinsconsulting

😀
Creating NeXT Generation eZ Platform Software
View GitHub Profile
$ php app/console bdtest:match-uri /Getting-Started/Selected-Features/Create
# Router
route: ez_urlalias
controller: ez_content:viewContent
arguments:
- contentId: 69
- locationId: 71
- viewType: full
- layout: 1
@arnebratt
arnebratt / gist:571269541df60de1b683
Created April 20, 2015 11:25
eZ Publish kernel hack to use production images in a dev environment
--- kernel/classes/datatypes/ezimage/ezimagealiashandler.php 2014-07-17 11:18:00.000000000 +0200
+++ kernel/classes/datatypes/ezimage/ezimagealiashandler.php 2014-07-17 11:51:57.000000000 +0200
@@ -551,6 +551,10 @@
}
$this->setOriginalAttributeData( $originalData );
+ $ini = eZINI::instance( 'image.ini' );
+ $imagesRemoteUrl = $ini->variable( 'ImageConverterSettings', 'ImagesRemoteURL' );
+ $imagesRemoteUrl = rtrim( $imagesRemoteUrl, '/' ) . '/';
+
<?php
/**
* @author Henning Kvinnesland <henning@keyteq.no>
* @since 02.06.15
*/
namespace Kavli\GenericBundle\Override;
class ContentPackageHandler extends \eZContentObjectPackageHandler
{
<?php
/**
* @author Henning Kvinnesland <henning@keyteq.no>
* @since 02.06.15
*/
namespace Kavli\GenericBundle\Override;
class ContentPackageHandler extends \eZContentObjectPackageHandler
{
<?php
/**
* @author Henning Kvinnesland <henning@keyteq.no>
* @since 02.06.15
*/
namespace Kavli\GenericBundle\Override;
class ContentPackageHandler extends \eZContentObjectPackageHandler
{
@bchoquet-heliopsis
bchoquet-heliopsis / HelioINIZetaDBFactory.php
Created May 18, 2011 16:48
Helper returning ezcDbHandler From eZPublish database settings
<?php
class HelioINIZetaDBFactory
{
/**
* Database implementations mapping
* Key is eZPublish ImplementationAlias, Value is ezcDbFactory alias
* @var array
*/
private static $map = array(
'mysql' => 'mysql',
@brookinsconsulting
brookinsconsulting / README
Created November 13, 2011 01:13
Example 'member_of_role' template operator autoload configuration file and OWSimpleOperator based 'BCMemberOfRoleByUserIDOperator' class and method 'member_of_role' (both required). Provided class method 'member_of_role' can be called in PHP.
Name: BC Member Of Role (extension)
A OWSimpleOperator based template operator extension for eZ Publish ( 4.x -> 4.6 ( Community Build 2011.10 ) )
About this Gist
This Gist based solution graduated on 2011/11/12 to a full fledged, ready to use out of the box, eZ Publish based extension.
The extension based solution is ready to use with eZ Publish right out of the box with no additional configuration required.
@brookinsconsulting
brookinsconsulting / BcLowerCaseUnderscoreUrlAliasSlugConverter.php
Last active March 10, 2017 02:31 — forked from skrosoft/SlugConverterLC.php
ezpublishplatform and ezplatform SlugConverter class to transform all urlalias(es) into lowecase (ezp v3 style)
<?php
/**
* File containing the BcLowerCaseUnderscoreUrlAliasSlugConverter class part of the BcLowerCaseUrlAliasBundle package.
*
* @copyright Copyright (C) Brookins Consulting. All rights reserved.
* @license For full copyright and license information view LICENSE and COPYRIGHT.md file distributed with this source code.
* @version //autogentag//
* @package BcLowerCaseUrlAliasBundle
*/
@sdaoudi
sdaoudi / AliasCleaner.php
Last active April 18, 2017 17:24
Command to remove all alias images - eZ Publish 2014.11
<?php
namespace Ayaline\Bundle\EzToolsBundle\Image;
use eZ\Publish\Core\FieldType\Image\AliasCleanerInterface;
use eZ\Publish\Core\IO\UrlRedecoratorInterface;
use Liip\ImagineBundle\Imagine\Filter\FilterConfiguration;
class AliasCleaner implements AliasCleanerInterface
{
#!/usr/bin/env ruby
# Using this script as your post-receive hook will update mirrors using git
# push --mirror. To make this work you have to ensure that access is taken
# care of (for example by setting up .ssh/config with an SSH key for the
# user that runs the hook).
#
# To use this script populate /home/git/git-mirrors.yml with YAML like so:
# ---
# user/repo1.git: