Skip to content

Instantly share code, notes, and snippets.

@hissy
Created December 28, 2013 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hissy/8157770 to your computer and use it in GitHub Desktop.
Save hissy/8157770 to your computer and use it in GitHub Desktop.
[concrete5] Override core components by Package
<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
class OverrideTestPackage extends Package {
protected $pkgHandle = 'override_test';
protected $appVersionRequired = '5.6.2';
protected $pkgVersion = '0.0.1';
public function getPackageDescription() {
return '';
}
public function getPackageName() {
return 'Override Test';
}
public function on_start() {
$env = Environment::get();
$env->overrideCoreByPackage('elements/header_required.php', $this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment