src/Translation/Extraction/File/KunstmaanExtractor.php
public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue)
    {
        if ($file->getExtension() != 'yml') {
            return;
        }
        $path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/');
        if (strpos($path, 'Resources/config/pageparts') === false) {
            return;
        }
        $parser = $this->getYmlParser();
        $pagePartConfigs = $parser->parse(file_get_contents($file));
        if (array_key_exists('types', $pagePartConfigs) && is_array($pagePartConfigs['types'])) {
            foreach ($pagePartConfigs['types'] as $type) {
                if (is_array($type) && array_key_exists('name', $type)) {
                    $message = new Message($type['name']);
                    $message->addSource(new FileSource((string)$file));
                    $catalogue->add($message);
                }
            }
        }
    }
public function visitFile(\SplFileInfo $file, MessageCatalogue $catalogue)
    {
        if ($file->getExtension() != 'yml') {
            return;
        }
        $path = strtr($file->getRealPath(), DIRECTORY_SEPARATOR, '/');
        if (strpos($path, 'Resources/config/pageparts') === false) {
            return;
        }
        $parser = $this->getYmlParser();
        $pagePartConfigs = $parser->parse(file_get_contents($file));
        if (array_key_exists('types', $pagePartConfigs) && is_array($pagePartConfigs['types'])) {
            foreach ($pagePartConfigs['types'] as $type) {
                if (is_array($type) && array_key_exists('name', $type)) {
                    $message = new Message($type['name']);
                    $message->addSource(new FileSource((string)$file));
                    $catalogue->add($message);
                }
            }
        }
    }
public function visitFile ( \ SplFileInfo $ file , MessageCatalogue $ catalogue ) { if ( $ file -> getExtension ( ) != 'yml' ) { return ; } $ path = strtr ( $ file -> getRealPath ( ) , DIRECTORY_SEPARATOR , '/' ) ; if ( strpos ( $ path , 'Resources/config/pageparts' ) === false ) { return ; } $ parser = $ this -> getYmlParser ( ) ; $ pagePartConfigs = $ parser -> parse ( file_get_contents ( $ file ) ) ; if ( array_key_exists ( 'types' , $ pagePartConfigs ) && is_array ( $ pagePartConfigs [ 'types' ] ) ) { foreach ( $ pagePartConfigs [ 'types' ] as $ type ) { if ( is_array ( $ type ) && array_key_exists ( 'name' , $ type ) ) { $ message = new Message ( $ type [ 'name' ] ) ; $ message -> addSource ( new FileSource ( ( string ) $ file ) ) ; $ catalogue -> add ( $ message ) ; } } } }
Collect the pagepart names!

@param \SplFileInfo $file
@param MessageCatalogue $catalogue
Collect the pagepart names!