Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Example\Bundle\ConsumerSiteBundle\Command;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
<?php
public function onConsoleCommand(ConsoleCommandEvent $event)
{
$siteAccessName = $event->getInput()->getParameterOption('--siteaccess', null);
$siteAccess = $this->container->get('ezpublish.siteaccess');
$siteAccess->name = $siteAccessName ?: $this->container->getParameter('ezpublish.siteaccess.default');
$siteAccess->matchingType = 'cli';
<?php
/**
* File containing the LegacyKernelListener class.
*
* @copyright Copyright (C) eZ Systems AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
* @version //autogentag//
*/
namespace eZ\Bundle\EzPublishLegacyBundle\EventListener;
<?php
namespace TestBundle\Command;
use Doctrine\DBAL\Connection;
use GuzzleHttp\Client;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class TestSiteAccessCommand extends ContainerAwareCommand
C:\Users\user\Downloads\electron-boilerplate\ser\node_modules\serialport>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bi
n\node-gyp.js" rebuild --name=serialport --configuration=Release --module_name=serialport --version=2.0.1 --major=2 --patch=1 --runtime=node --node_abi=node-v46 --platform=win32 --target_platform=win32 --arc
h=x64 --target_arch=x64 --module_main=./serialport --host=https://node-serialport.s3.amazonaws.com/ --module_path=C:\Users\user\Downloads\electron-boilerplate\ser\node_modules\serialport\build\serialport\
v2.0.1\Release\node-v46-win32-x64 --remote_path=./serialport/v2.0.1/Release/ --package_name=node-v46-win32-x64.tar.gz --staged_tarball=build\stage\serialport\v2.0.1\Release\node-v46-win32-x64.tar.gz --hosted
_path=https://node-serialport.s3.amazonaws.com/serialport/v2.0.1/Release/ --hosted_tarball=https://node-serialport.s3.amazonaws.com/serialport/v2.0.1/Release/node-v46-win32-x64.tar.gz ) else (node
<?php
namespace TestBundle\Controller;
use eZ\Bundle\EzPublishCoreBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
/**
* @Route("/routertest")
<?php
protected function addLocationWithChildrenToMenu(ItemInterface $menu, Location $location, $depth = 1, $skip = true)
{
if (!$depth || $location->invisible) {
return $menu;
}
if ($skip) {
$childMenu = $menu;
YUI.add('wizhippo-editcontentviewplugin', function (Y) {
"use strict";
Y.namespace('Wizhippo.Plugin');
Y.Wizhippo.Plugin.WizhippoContentEditView = Y.Base.create('wizhippoContentEditView', Y.Plugin.Base, [], {
initializer: function () {
var view = this.get('host');
var actionBar = view.get('actionBar');
var actionsList = actionBar.get('actionsList');
<?php
namespace ExampleBundle\Controller;
use eZ\Bundle\EzPublishLegacyBundle\Controller;
use eZ\Publish\API\Repository\Values\Content\Query;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\SortClause;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
YUI.add('app-navigationhubviewplugin', function (Y) {
"use strict";
Y.namespace('MyApp');
Y.MyApp.NavigationHubViewPlugin = Y.Base.create('appNavigationHubViewPlugin', Y.Plugin.Base, [], {
initializer: function () {
Y.log("newzone");
},
}, {