Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Tourinsoft
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
Tourinsoft
Commits
1ec4539c
Commit
1ec4539c
authored
Nov 13, 2018
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(all): change
parent
8a127c1e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
FluxType.php
src/Form/FluxType.php
+1
-1
Flux.php
src/Storage/Entity/Flux.php
+6
-6
Flux.php
src/Storage/Schema/Table/Flux.php
+2
-2
ContentTypeFile.php
src/Utils/ContentTypeFile.php
+3
-3
No files found.
src/Form/FluxType.php
View file @
1ec4539c
...
@@ -54,7 +54,7 @@ class FluxType extends AbstractType
...
@@ -54,7 +54,7 @@ class FluxType extends AbstractType
]
]
])
])
->
add
(
->
add
(
'
flux_
keys'
,
'keys'
,
KeyType
::
class
,
KeyType
::
class
,
[
[
'label'
=>
false
,
'label'
=>
false
,
...
...
src/Storage/Entity/Flux.php
View file @
1ec4539c
...
@@ -18,7 +18,7 @@ class Flux extends Entity
...
@@ -18,7 +18,7 @@ class Flux extends Entity
/** @var string */
/** @var string */
protected
$code
;
protected
$code
;
/** @var array */
/** @var array */
protected
$
flux_
keys
;
protected
$keys
;
/** @var string */
/** @var string */
protected
$contentType
;
protected
$contentType
;
...
@@ -89,18 +89,18 @@ class Flux extends Entity
...
@@ -89,18 +89,18 @@ class Flux extends Entity
/**
/**
* @return array
* @return array
*/
*/
public
function
get
Flux
Keys
()
public
function
getKeys
()
{
{
return
$this
->
flux_
keys
;
return
$this
->
keys
;
}
}
/**
/**
* @param
$flux_
keys
* @param
array $
keys
* @return Flux
* @return Flux
*/
*/
public
function
set
FluxKeys
(
$flux_
keys
)
public
function
set
Keys
(
$
keys
)
{
{
$this
->
flux_keys
=
$flux_
keys
;
$this
->
keys
=
$
keys
;
return
$this
;
return
$this
;
}
}
...
...
src/Storage/Schema/Table/Flux.php
View file @
1ec4539c
...
@@ -15,7 +15,7 @@ class Flux extends BaseTable
...
@@ -15,7 +15,7 @@ class Flux extends BaseTable
$this
->
table
->
addColumn
(
'id'
,
'integer'
,
[
'autoincrement'
=>
true
]);
$this
->
table
->
addColumn
(
'id'
,
'integer'
,
[
'autoincrement'
=>
true
]);
$this
->
table
->
addColumn
(
'title'
,
'string'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'title'
,
'string'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'code'
,
'string'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'code'
,
'string'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'
flux_
keys'
,
'json_array'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'keys'
,
'json_array'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'contentType'
,
'string'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'contentType'
,
'string'
,
[
'notnull'
=>
true
]);
$this
->
table
->
addColumn
(
'viewless'
,
'boolean'
,
[
'default'
=>
false
]);
$this
->
table
->
addColumn
(
'viewless'
,
'boolean'
,
[
'default'
=>
false
]);
$this
->
table
->
addColumn
(
'searchable'
,
'boolean'
,
[
'default'
=>
true
]);
$this
->
table
->
addColumn
(
'searchable'
,
'boolean'
,
[
'default'
=>
true
]);
...
@@ -30,7 +30,7 @@ class Flux extends BaseTable
...
@@ -30,7 +30,7 @@ class Flux extends BaseTable
*/
*/
protected
function
addIndexes
()
protected
function
addIndexes
()
{
{
/*$this->table->addIndex(['flux_keys']);*/
$this
->
table
->
addIndex
([
'keys'
]);
$this
->
table
->
addIndex
([
'id'
]);
$this
->
table
->
addIndex
([
'id'
]);
}
}
...
...
src/Utils/ContentTypeFile.php
View file @
1ec4539c
...
@@ -12,7 +12,7 @@ class ContentTypeFile
...
@@ -12,7 +12,7 @@ class ContentTypeFile
/**
/**
* @var array
* @var array
*/
*/
private
$
flux_
keys
;
private
$keys
;
/**
/**
* @var Application
* @var Application
*/
*/
...
@@ -39,7 +39,7 @@ class ContentTypeFile
...
@@ -39,7 +39,7 @@ class ContentTypeFile
if
(
empty
(
$flux
->
getCode
())
||
empty
(
$flux
->
getContentType
()))
{
if
(
empty
(
$flux
->
getCode
())
||
empty
(
$flux
->
getContentType
()))
{
throw
new
\Exception
(
'Le flux est invalide.'
);
throw
new
\Exception
(
'Le flux est invalide.'
);
}
}
$this
->
flux_
keys
=
$keys
;
$this
->
keys
=
$keys
;
$this
->
application
=
$application
;
$this
->
application
=
$application
;
$this
->
options
=
$options
;
$this
->
options
=
$options
;
$this
->
flux
=
$flux
;
$this
->
flux
=
$flux
;
...
@@ -88,7 +88,7 @@ class ContentTypeFile
...
@@ -88,7 +88,7 @@ class ContentTypeFile
'group'
=>
'content'
'group'
=>
'content'
];
];
foreach
(
$this
->
flux_
keys
as
$key
)
{
foreach
(
$this
->
keys
as
$key
)
{
$fields
[
strtolower
(
$key
)]
=
[
$fields
[
strtolower
(
$key
)]
=
[
'type'
=>
'text'
,
'type'
=>
'text'
,
'label'
=>
$this
->
getFieldLabel
(
$key
),
'label'
=>
$this
->
getFieldLabel
(
$key
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment