Changeset 82428 in spip-zone


Ignore:
Timestamp:
May 15, 2014, 8:53:43 PM (5 years ago)
Author:
marcimat@…
Message:

Un pipeline pour renseigner ou modifier la classe calculant les documents à indexer d'un objet spip.

Location:
_plugins_/indexer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/indexer/trunk/lib/Indexer/Sources/Sources.php

    r82369 r82428  
    1313    }
    1414
    15     public function register(SourceInterface $source) {
    16         $this->sources[] = $source;
     15    public function register($cle, SourceInterface $source) {
     16        $this->sources[$cle] = $source;
    1717    }
    1818
  • _plugins_/indexer/trunk/prive/squelettes/contenu/indexer.html

    r82426 r82428  
    1414
    1515$sources = new Indexer\Sources\Sources();
    16 $sources->register(new Spip\Indexer\Sources\Articles());
     16$sources->register('articles', new Spip\Indexer\Sources\Articles());
     17$sources = pipeline('indexer_sources', $sources);
    1718
    1819$SpipSourcesIndexer = new Spip\Indexer\Sources\SpipSourcesIndexer($indexer, $sources);
Note: See TracChangeset for help on using the changeset viewer.