| @@ 782-804 (lines=23) @@ | ||
| 779 | * |
|
| 780 | * @return string |
|
| 781 | */ |
|
| 782 | public function getCss() |
|
| 783 | { |
|
| 784 | // Set the template engine cache dir |
|
| 785 | $this->setTemplateCacheDir(); |
|
| 786 | ||
| 787 | $sCode = ''; |
|
| 788 | foreach($this->aResponsePlugins as $xPlugin) |
|
| 789 | { |
|
| 790 | if(($str = trim($xPlugin->getCss()))) |
|
| 791 | { |
|
| 792 | $sCode .= rtrim($str, " \n") . "\n"; |
|
| 793 | } |
|
| 794 | } |
|
| 795 | foreach($this->aPackages as $sClass) |
|
| 796 | { |
|
| 797 | $xPackage = jaxon()->di()->get($sClass); |
|
| 798 | if(($str = trim($xPackage->css()))) |
|
| 799 | { |
|
| 800 | $sCode .= rtrim($str, " \n") . "\n"; |
|
| 801 | } |
|
| 802 | } |
|
| 803 | return $sCode; |
|
| 804 | } |
|
| 805 | ||
| 806 | /** |
|
| 807 | * Get the correspondances between previous and current config options |
|
| @@ 859-879 (lines=21) @@ | ||
| 856 | * |
|
| 857 | * @return string |
|
| 858 | */ |
|
| 859 | private function getReadyScript() |
|
| 860 | { |
|
| 861 | $sPluginScript = ''; |
|
| 862 | foreach($this->aResponsePlugins as $xPlugin) |
|
| 863 | { |
|
| 864 | if(($str = trim($xPlugin->getScript()))) |
|
| 865 | { |
|
| 866 | $sPluginScript .= "\n" . trim($str, " \n"); |
|
| 867 | } |
|
| 868 | } |
|
| 869 | foreach($this->aPackages as $sClass) |
|
| 870 | { |
|
| 871 | $xPackage = jaxon()->di()->get($sClass); |
|
| 872 | if(($str = trim($xPackage->ready()))) |
|
| 873 | { |
|
| 874 | $sPluginScript .= "\n" . trim($str, " \n"); |
|
| 875 | } |
|
| 876 | } |
|
| 877 | ||
| 878 | return $this->render('jaxon::plugins/ready.js', ['sPluginScript' => $sPluginScript]); |
|
| 879 | } |
|
| 880 | ||
| 881 | /** |
|
| 882 | * Get the javascript code to be sent to the browser |
|