Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
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
PSDI Army
yii2
Commits
c072cc2e
Commit
c072cc2e
authored
Aug 12, 2014
by
Klimov Paul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
`yii\behaviors\Sluggable` adjusted
parent
ce183732
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
SluggableBehavior.php
framework/behaviors/SluggableBehavior.php
+2
-6
No files found.
framework/behaviors/SluggableBehavior.php
View file @
c072cc2e
...
...
@@ -136,11 +136,7 @@ class SluggableBehavior extends AttributeBehavior
$isNewSlug
=
true
;
if
(
$this
->
attribute
!==
null
)
{
if
(
is_array
(
$this
->
attribute
))
{
$attributes
=
$this
->
attribute
;
}
else
{
$attributes
=
[
$this
->
attribute
];
}
$attributes
=
(
array
)
$this
->
attribute
;
/* @var $owner BaseActiveRecord */
$owner
=
$this
->
owner
;
if
(
!
$owner
->
getIsNewRecord
()
&&
!
empty
(
$owner
->
{
$this
->
slugAttribute
}))
{
...
...
@@ -205,7 +201,7 @@ class SluggableBehavior extends AttributeBehavior
* Generates slug using configured callback or increment of iteration.
* @param string $baseSlug base slug value
* @param integer $iteration iteration number
* @return string
slug suffix
* @return string
new slug value
* @throws \yii\base\InvalidConfigException
*/
private
function
generateUniqueSlug
(
$baseSlug
,
$iteration
)
...
...
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