CustomDifferenceEngine.php 488 B

123456789101112131415161718192021222324
  1. <?php
  2. class CustomDifferenceEngine extends DifferenceEngine {
  3. public function __construct() {
  4. parent::__construct();
  5. }
  6. public function generateContentDiffBody( Content $old, Content $new ) {
  7. return $old->getNativeData() . '|' . $new->getNativeData();
  8. }
  9. public function showDiffStyle() {
  10. $this->getOutput()->addModules( 'foo' );
  11. }
  12. public function getDiffBodyCacheKeyParams() {
  13. $params = parent::getDiffBodyCacheKeyParams();
  14. $params[] = 'foo';
  15. return $params;
  16. }
  17. }