Skip to content

Instantly share code, notes, and snippets.

@YuzuruSano
Last active December 11, 2015 07:20
Show Gist options
  • Save YuzuruSano/f74ade8834c50a751023 to your computer and use it in GitHub Desktop.
Save YuzuruSano/f74ade8834c50a751023 to your computer and use it in GitHub Desktop.
concrete5 5.7〜 core class override sample
<?php
use Symfony\Component\ClassLoader\MapClassLoader;
defined('C5_EXECUTE') or die('Access Denied.');
/**
* ----------------------------------------------------------------------------
* Load all composer autoload items.
* ----------------------------------------------------------------------------
*/
if (!@include(DIR_BASE_CORE . '/' . DIRNAME_VENDOR . '/autoload.php')) {
die('Third party libraries not installed. Make sure that composer has required libraries in the concrete/ directory.');
}
$mapping = array(
//変更対象ファイルはapplication/src/Core内に構造を保ったままコピーする
'Concrete\\Core\\Block\\View\\BlockView' => DIR_APPLICATION . '/src/Core/Block/View/BlockView.php'
);
$loader = new MapClassLoader($mapping);
$loader->register();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment