Skip to content

Commit

Permalink
Improve Manifest and mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
kekefreedog committed Dec 8, 2024
1 parent bfd8183 commit 73ce904
Show file tree
Hide file tree
Showing 5 changed files with 498 additions and 15 deletions.
8 changes: 6 additions & 2 deletions resources/Php/app/Controller/Assets/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* Dependances
*/
use CrazyPHP\Core\Media\Favicon as MediaFavion;
use CrazyPHP\Library\File\Config;
use CrazyPHP\Core\Controller;
use CrazyPHP\Core\Response;
use CrazyPHP\Model\Asset;
Expand All @@ -41,6 +42,9 @@ public static function get($request){
$appNameTemp = explode("/", $config["App"]["name"], 2);
$appName = array_pop($appNameTemp);

# Get theme source
$themeSource = Config::getValue("Style.materialDynamicColors.source");

# Set data
$data = [
"name" => $appName,
Expand All @@ -57,8 +61,8 @@ public static function get($request){
"type" => "image/png"
]
],
"theme_color" => "#ffffff",
"background_color" => "#ffffff",
"theme_color" => $themeSource ? $themeSource : "#ffffff",
"background_color" => $themeSource ? $themeSource : "#ffffff",
"display" => "standalone",
];

Expand Down
30 changes: 30 additions & 0 deletions src/Core/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,36 @@ function(&$v){

}

/**
* Get List of all model names
*
* @return array
*/
public static function getListAllModelNames():array {

# Set result
$result = [];

# Get all model available
$modelConfig = Config::getValue("Model");

# Check model config
if(is_array($modelConfig) && !empty($modelConfig))

# Iteration model config
foreach($modelConfig as $item)

# Check name
if(isset($item["name"]) && $item["name"])

# Push name in result
$result[] = $item["name"];

# Return result
return $result;

}

/**
* Check Entity in Entity
*
Expand Down
Loading

0 comments on commit 73ce904

Please sign in to comment.