src/Draggy/Loader.php
public function getLoaderJS()
    {
        if ($this->newFile) {
            return '';
        }

        $r = '';

        $r .= $this->getProjectProperties();

        // FIRST STEP: Load all modules and entities
        $r .= $this->getModules();
        $r .= $this->getClasses();
        $r .= $this->getAbstracts();
        $r .= $this->getInterfaces();

        // SECOND STEP: Add the attributes
        $r .= $this->getAttributes();

        // THIRD STEP: After attributes entity properties
        $r .= $this->getClassLikeAfterAttributesProperties();

        // FOURTH STEP: Relationships
        $r .= $this->getRelationships();

        $r .= $this->getAutocodeProperties();

        // Finalise
        $r .= 'for (var i in Connectable.prototype.connectables) Connectable.prototype.connectables[i].reDraw();' . PHP_EOL;
        $r .= 'Link.prototype.reDrawLinks();' . PHP_EOL;
        $r .= 'System.prototype.runtime = true;' . PHP_EOL;

        return $r;
    }
public function getLoaderJS()
    {
        if ($this->newFile) {
            return '';
        }

        $r = '';

        $r .= $this->getProjectProperties();

        // FIRST STEP: Load all modules and entities
        $r .= $this->getModules();
        $r .= $this->getClasses();
        $r .= $this->getAbstracts();
        $r .= $this->getInterfaces();

        // SECOND STEP: Add the attributes
        $r .= $this->getAttributes();

        // THIRD STEP: After attributes entity properties
        $r .= $this->getClassLikeAfterAttributesProperties();

        // FOURTH STEP: Relationships
        $r .= $this->getRelationships();

        $r .= $this->getAutocodeProperties();

        // Finalise
        $r .= 'for (var i in Connectable.prototype.connectables) Connectable.prototype.connectables[i].reDraw();' . PHP_EOL;
        $r .= 'Link.prototype.reDrawLinks();' . PHP_EOL;
        $r .= 'System.prototype.runtime = true;' . PHP_EOL;

        return $r;
    }
public function getLoaderJS ( ) { if ( $ this -> newFile ) { return '' ; } $ r = '' ; $ r .= $ this -> getProjectProperties ( ) ; // FIRST STEP: Load all modules and entities $ r .= $ this -> getModules ( ) ; $ r .= $ this -> getClasses ( ) ; $ r .= $ this -> getAbstracts ( ) ; $ r .= $ this -> getInterfaces ( ) ; // SECOND STEP: Add the attributes $ r .= $ this -> getAttributes ( ) ; // THIRD STEP: After attributes entity properties $ r .= $ this -> getClassLikeAfterAttributesProperties ( ) ; // FOURTH STEP: Relationships $ r .= $ this -> getRelationships ( ) ; $ r .= $ this -> getAutocodeProperties ( ) ; // Finalise $ r .= 'for (var i in Connectable.prototype.connectables) Connectable.prototype.connectables[i].reDraw();' . PHP_EOL ; $ r .= 'Link.prototype.reDrawLinks();' . PHP_EOL ; $ r .= 'System.prototype.runtime = true;' . PHP_EOL ; return $ r ; }
Returns all the JS code to load the project

@return string
Returns all the JS code to load the project