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
<?xml version="1.0" encoding="UTF-8"?> | |
<concrete5-cif version="1.0"> | |
<users> | |
<user username="editor" email="editor@example.com"> | |
<groups> | |
<group path="/Editor"/> | |
</groups> | |
</user> | |
<user username="approver_a" email="approver_a@example.com"> | |
<groups> |
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 | |
/* @var Concrete\Core\Application\Application $app */ | |
/* @var Concrete\Core\Console\Application $console only set in CLI environment */ | |
/** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $director */ | |
$director = $app->make(\Symfony\Component\EventDispatcher\EventDispatcherInterface::class); | |
$director->addListener('on_sitemap_xml_ready', static function ($event) use ($app) { | |
/** @var \Concrete\Core\Page\Sitemap\Event\XmlReadyEvent $event */ | |
$xml = $event->getDocument(); |
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 | |
/* @var Concrete\Core\Application\Application $app */ | |
/* @var Concrete\Core\Console\Application $console only set in CLI environment */ | |
/** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $director */ | |
$director = $app->make(\Symfony\Component\EventDispatcher\EventDispatcherInterface::class); | |
$director->addListener('on_sitemap_xml_ready', static function ($event) use ($app) { | |
/** @var \Concrete\Core\Page\Sitemap\Event\XmlReadyEvent $event */ | |
$xml = $event->getDocument(); |
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 Application\Block\ExpressEntryDetail; | |
use Concrete\Core\Html\Service\Seo; | |
use Concrete\Core\Url\SeoCanonical; | |
class Controller extends \Concrete\Block\ExpressEntryDetail\Controller | |
{ | |
public function action_view_express_entity($exEntryID = null) | |
{ |
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
| Block Type Handle | Block Type Name | | |
| ---- | ---- | | |
<?php | |
$types = \Concrete\Core\Block\BlockType\BlockTypeList::getInstalledList(); | |
/** @var \Concrete\Core\Entity\Block\BlockType\BlockType $type */ | |
foreach ($types as $type) { | |
echo sprintf('|%s|%s|', $type->getBlockTypeHandle(), $type->getBlockTypeName()); | |
echo PHP_EOL; | |
} |
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 | |
defined('C5_EXECUTE') or die("Access Denied."); | |
class ClearEmptyWorkflowProgress extends Job | |
{ | |
public function getJobName() | |
{ | |
return t("Clear Empty Workflow Progress"); |
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 | |
/** | |
* How to set sql_mode from database.php | |
* It will help to solve the error like "SQLSTATE[42000]: Syntax error or access violation: | |
* 1055 Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column | |
* 'concrete5.cv.cvPublishDate' which is not functionally dependent on columns in GROUP BY clause; | |
* this is incompatible with sql_mode=only_full_group_by" | |
*/ |
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 | |
use Concrete\Core\Page\Page; | |
use Concrete\Core\Page\PageList; | |
use Concrete\Core\Support\Facade\Facade; | |
$app = Facade::getFacadeApplication(); | |
$app->make('cache/request')->disable(); | |
$app->make('cache/expensive')->disable(); | |
$app->make('cache')->disable(); |
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 | |
$list = new \Concrete\Core\Page\PageList(); | |
$list->ignorePermissions(); | |
$pages = $list->getResults(); | |
$count = 0; | |
/** @var \Concrete\Core\Page\Page $page */ | |
foreach ($pages as $page) { |
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 | |
/** | |
* Usage: | |
* concrete/bin/concrete5 c5:exec bulk_change_page_template.php old_page_template_handle /parent-page-path new_page_template_handle | |
*/ | |
$filterPageTemplateHandle = $args[0]; | |
$filterPagePath = $args[1]; | |
$changePageTemplateHandle = $args[2]; |