Schema | Input/Output |
---|---|
Common Definitions | Input/Output |
Root Resources | Output |
Content | Output |
Relation | Output |
Version | Output |
VersionInfo | Output |
VersionList | Output |
VersionUpdate | Input |
This file contains hidden or 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/bash | |
# | |
# Copyright (c) 2017 - 2018, Andrew Longosz | |
# | |
files=$(git diff --cached --name-only --diff-filter=ACMRTU|grep '.php$'|paste -sd ' ' -) | |
echo "Fixing new and/or modified files: $files" | |
php-cs-fixer -v --config=.php_cs fix $files | |
This file contains hidden or 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 | |
use eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException; | |
use eZ\Publish\Core\FieldType\Country\Value as CountryValue; | |
$countryContentType = $contentTypeService->loadContentTypeByIdentifier('country_t'); | |
$countryFieldDefinition = $countryContentType->getFieldDefinition('country'); | |
$countryFieldType = $fieldTypeService->getFieldType( | |
$countryFieldDefinition->fieldTypeIdentifier | |
); |
This file contains hidden or 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 | |
/** | |
* Resolve Asset URL optionally prefixed with package name. | |
* | |
* @param string $path Asset URL | |
* | |
* @return string | |
*/ |
This file contains hidden or 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
parameters: | |
# ... other stuff | |
search_engine: solr | |
solr_dsn: 'http://localhost:8983/solr' |
This file contains hidden or 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 | |
try { | |
$url = parent::generate($name, $parameters, $referenceType); | |
// Now putting back SiteAccess URI if needed. | |
if ($isSiteAccessAware && $siteAccess && $siteAccess->matcher instanceof URILexer) { | |
if ($referenceType === self::ABSOLUTE_URL || $referenceType === self::NETWORK_PATH) { | |
$scheme = $context->getScheme(); | |
$port = ''; |
This file contains hidden or 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
<IfModule mod_fastcgi.c> | |
AddType application/x-httpd-fastphp7 .php | |
Action application/x-httpd-fastphp7 /php7-fcgi | |
Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi | |
FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket /var/run/php7-fpm.sock -pass-header Authorization | |
<Directory /usr/lib/cgi-bin> | |
Require all granted | |
</Directory> | |
</IfModule> |
This file contains hidden or 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
#!/usr/bin/env python | |
# | |
# by @Nattfarinn, improved by @alongosz | |
# Requires php-cs-fixer executable | |
# Place it in your repository, in .git/hooks/pre-commit | |
import sys | |
import subprocess | |
process = subprocess.Popen(['git', 'diff', '--cached', '--name-only', '--diff-filter=ACMRT'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
This file contains hidden or 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
/** | |
* @param \Doctrine\DBAL\Connection $connection | |
* @param string $table db table name | |
* @param array $predicates | |
*/ | |
private function displayDbTable(\Doctrine\DBAL\Connection $connection, $table, array $predicates = []) | |
{ | |
$query = $connection->createQueryBuilder(); | |
$query | |
->select('*') |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |