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
// JsonDate reflects the date format "yyyy-mm-dd" used in the API and the calendar component in the frontend. | |
type JsonDate time.Time | |
// UnmarshalJSON parses json dates | |
func (j *JsonDate) UnmarshalJSON(b []byte) error { | |
s := strings.Trim(string(b), "\"") | |
t, err := time.Parse("2006-01-02", s) | |
if err != nil { | |
return err | |
} |
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
/** | |
* Dump Routes to YAML File. | |
*/ | |
public function dumpRoutes() | |
{ | |
/** @var $router \Symfony\Component\Routing\Router */ | |
$router = $this->container->get('router'); | |
$collection = $router->getRouteCollection(); | |
$allRoutes = $collection->all(); | |
array_multisort($allRoutes); |
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 Webmanufaktur\MySite\Routing; | |
use eZ\Publish\API\Repository\Values\Content\Location; | |
use eZ\Publish\Core\MVC\ConfigResolverInterface; | |
use eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator; | |
use eZ\Publish\Core\SignalSlot\Repository; | |
use Symfony\Cmf\Component\Routing\ChainedRouterInterface; | |
use Symfony\Component\HttpFoundation\Request; |
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
#!/bin/sh | |
# purge image variations | |
# | |
# run this script when parameters in image.yml are changed as eZ 2014.11 does not purge invalid | |
# variations automatically | |
readonly variations="reference | |
article_full | |
article_line |
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
{# check if a field is not defined or empty #} | |
{% macro is_empty(content, field_name) %}{% spaceless %} | |
{{ content.fields[field_name] is not defined or ez_is_field_empty(content, field_name) }} | |
{% endspaceless %}{% endmacro %} |
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
$searchText = $request->query->get('SearchText'); | |
$sort = array( 'modified' => 'false' ); | |
$contentTypeIdenfiers = array( 31 ); | |
$searchResult = $this->getLegacyKernel()->runCallback( | |
function () use ( $searchText, $sort, $contentTypeIdenfiers ) | |
{ | |
// eZFunctionHandler::execute is the equivalent for a legacy template fetch function | |
// The following is the same than fetch( 'content', 'search', hash(...) ) | |
return eZFunctionHandler::execute( |
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
public function indexAction( $locationId = 2 ) | |
{ | |
$response = new Response; | |
$response = $this->cacheResponse( $response, $locationId, 10 ); | |
/** @var $repository \eZ\Publish\API\Repository\Repository */ | |
$repository = $this->getRepository(); | |
$contentService = $repository->getContentService(); | |
$locationService = $repository->getLocationService(); |
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
<div class="jvembed jvembed-youtube"><iframe width="560" height="315" src="//www.youtube.com/embed/MfOnq-zXXBw" frameborder="0" allowfullscreen=""></iframe></div> |
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
ezpublish: | |
... | |
system: | |
... | |
ftswps_user__com: | |
anonymous_user_id: 503 | |
languages: | |
- eng-US | |
ftswps_user__uk: | |
anonymous_user_id: 504 |
NewerOlder