1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-19 11:21:30 +02:00

Flextype Core: Add ability to work with different types of content #212 #186

- Entires updates
This commit is contained in:
Awilum
2019-08-12 00:20:35 +03:00
parent cccd306d30
commit eaee15c383

View File

@@ -390,7 +390,7 @@ class Entries
*
* @access public
*/
public function create(string $id, array $data) : bool
public function create(string $id, array $data, string $driver = 'json') : bool
{
$entry_dir = $this->_dir_location($id);
@@ -399,7 +399,7 @@ class Entries
// Try to create directory for new entry
if (Filesystem::createDir($entry_dir)) {
// Entry file path
$entry_file = $entry_dir . '/entry.json';
$entry_file = $entry_dir . '/entry' . '.' . $driver;
// Check if new entry file exists
if (! Filesystem::has($entry_file)) {