public function populateEntitiesFromInstall()
    {
        if ($this->automaticallyPopulated) {
            // already run
            return;
        }

        foreach (scandir(BASE_PATH) as $key => $entity) {
            if ($key == "themes") {
                continue;
            }

            $dir = DocumentationHelper::normalizePath(Controller::join_links(BASE_PATH, $entity));

            if (is_dir($dir)) {
                // check to see if it has docs
                $docs = Controller::join_links($dir, 'docs');

                if (is_dir($docs)) {
                    $entities[] = array(
                        'Path' => $docs,
                        'Title' => DocumentationHelper::clean_page_name($entity),
                        'Version' => 'master',
                        'Branch' => 'master',
                        'Stable' => true
                    );
                }
            }
        }

        Config::inst()->update(
            'DocumentationManifest',
            'register_entities',
            $entities
        );

        $this->automaticallyPopulated = true;
    }
public function populateEntitiesFromInstall()
    {
        if ($this->automaticallyPopulated) {
            // already run
            return;
        }

        foreach (scandir(BASE_PATH) as $key => $entity) {
            if ($key == "themes") {
                continue;
            }

            $dir = DocumentationHelper::normalizePath(Controller::join_links(BASE_PATH, $entity));

            if (is_dir($dir)) {
                // check to see if it has docs
                $docs = Controller::join_links($dir, 'docs');

                if (is_dir($docs)) {
                    $entities[] = array(
                        'Path' => $docs,
                        'Title' => DocumentationHelper::clean_page_name($entity),
                        'Version' => 'master',
                        'Branch' => 'master',
                        'Stable' => true
                    );
                }
            }
        }

        Config::inst()->update(
            'DocumentationManifest',
            'register_entities',
            $entities
        );

        $this->automaticallyPopulated = true;
    }
public function populateEntitiesFromInstall ( ) { if ( $ this -> automaticallyPopulated ) { // already run return ; } foreach ( scandir ( BASE_PATH ) as $ key => $ entity ) { if ( $ key == "themes" ) { continue ; } $ dir = DocumentationHelper :: normalizePath ( Controller :: join_links ( BASE_PATH , $ entity ) ) ; if ( is_dir ( $ dir ) ) { // check to see if it has docs $ docs = Controller :: join_links ( $ dir , 'docs' ) ; if ( is_dir ( $ docs ) ) { $ entities [ ] = array ( 'Path' => $ docs , 'Title' => DocumentationHelper :: clean_page_name ( $ entity ) , 'Version' => 'master' , 'Branch' => 'master' , 'Stable' => true ) ; } } } Config :: inst ( ) -> update ( 'DocumentationManifest' , 'register_entities' , $ entities ) ; $ this -> automaticallyPopulated = true ; }
Scans the current installation and picks up all the SilverStripe modules
that contain a `docs` folder.

@return void
Scans the current installation and picks up all the SilverStripe modules that contain a docs folder .