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
6e695feb
Commit
6e695feb
authored
Aug 20, 2019
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment slugKey to test
parent
3f66d80c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
ContentTypeFile.php
src/Utils/ContentTypeFile.php
+4
-5
Data.php
src/Utils/Data.php
+6
-7
No files found.
src/Utils/ContentTypeFile.php
View file @
6e695feb
...
@@ -121,14 +121,14 @@ class ContentTypeFile
...
@@ -121,14 +121,14 @@ class ContentTypeFile
if
(
!
empty
(
$this
->
options
[
'locales'
]))
{
if
(
!
empty
(
$this
->
options
[
'locales'
]))
{
foreach
(
$this
->
options
[
'locales'
]
as
$locale
)
{
foreach
(
$this
->
options
[
'locales'
]
as
$locale
)
{
$dataKey
=
strtolower
(
$locale
)
.
'data'
;
$dataKey
=
strtolower
(
$locale
)
.
'data'
;
$slugKey
=
strtolower
(
$locale
)
.
'slug'
;
/*$slugKey = strtolower($locale).'slug';*/
$fields
[
$dataKey
]
=
[
$fields
[
$dataKey
]
=
[
'type'
=>
'hidden'
'type'
=>
'hidden'
];
];
$fields
[
$slugKey
]
=
[
/*
$fields[$slugKey] = [
'type' => 'hidden',
'type' => 'hidden',
//'index' => true
//'index' => true
];
];
*/
}
}
}
}
return
$fields
;
return
$fields
;
...
@@ -173,4 +173,4 @@ class ContentTypeFile
...
@@ -173,4 +173,4 @@ class ContentTypeFile
return
$this
->
options
[
'field_mapping'
][
$key
][
'label'
];
return
$this
->
options
[
'field_mapping'
][
$key
][
'label'
];
}
}
}
}
\ No newline at end of file
src/Utils/Data.php
View file @
6e695feb
...
@@ -110,19 +110,19 @@ class Data
...
@@ -110,19 +110,19 @@ class Data
if
(
!
empty
(
$this
->
options
[
'locales'
]))
{
if
(
!
empty
(
$this
->
options
[
'locales'
]))
{
foreach
(
$this
->
options
[
'locales'
]
as
$locale
)
{
foreach
(
$this
->
options
[
'locales'
]
as
$locale
)
{
$dataKey
=
strtolower
(
$locale
)
.
'data'
;
$dataKey
=
strtolower
(
$locale
)
.
'data'
;
$slugKey
=
strtolower
(
$locale
)
.
'slug'
;
/*$slugKey = strtolower($locale) . 'slug';*/
if
(
$locale
==
$this
->
options
[
'default_locale'
])
{
if
(
$locale
==
$this
->
options
[
'default_locale'
])
{
$data
[
$dataKey
]
=
json_encode
([]);
$data
[
$dataKey
]
=
json_encode
([]);
$data
[
$slugKey
]
=
Slugify
::
create
()
->
slugify
(
$data
[
'syndicobjectname'
]
.
'-'
.
$data
[
'syndicobjectid'
]);
/*$data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
}
else
{
}
else
{
$dataLocale
=
$this
->
getDataForLocales
(
$locale
,
$data
[
'syndicobjectid'
]);
$dataLocale
=
$this
->
getDataForLocales
(
$locale
,
$data
[
'syndicobjectid'
]);
if
(
!
empty
(
$dataLocale
))
{
if
(
!
empty
(
$dataLocale
))
{
$data
[
$dataKey
]
=
json_encode
(
$dataLocale
);
$data
[
$dataKey
]
=
json_encode
(
$dataLocale
);
$data
[
$slugKey
]
=
$dataLocale
[
'slug'
];
/*$data[$slugKey] = $dataLocale['slug'];*/
}
else
{
}
else
{
$data
[
$dataKey
]
=
json_encode
([]);
$data
[
$dataKey
]
=
json_encode
([]);
$data
[
$slugKey
]
=
Slugify
::
create
()
->
slugify
(
$data
[
'syndicobjectname'
]
.
'-'
.
$data
[
'syndicobjectid'
]);
/* $data[$slugKey] = Slugify::create()->slugify($data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
}
}
}
}
...
@@ -146,7 +146,7 @@ class Data
...
@@ -146,7 +146,7 @@ class Data
$data
[
$key
]
=
$v
;
$data
[
$key
]
=
$v
;
}
}
$data
[
'title'
]
=
$data
[
'syndicobjectname'
];
$data
[
'title'
]
=
$data
[
'syndicobjectname'
];
$data
[
'slug'
]
=
Slugify
::
create
()
->
slugify
(
$locale
.
'-'
.
$data
[
'syndicobjectname'
]
.
'-'
.
$data
[
'syndicobjectid'
]);
/*$data['slug'] = Slugify::create()->slugify($locale. '-' .$data['syndicobjectname'].'-'.$data['syndicobjectid']);*/
return
$data
;
return
$data
;
}
}
...
@@ -155,4 +155,4 @@ class Data
...
@@ -155,4 +155,4 @@ class Data
return
[];
return
[];
}
}
}
}
\ No newline at end of file
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