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
404a219a
Commit
404a219a
authored
Jan 19, 2014
by
Alexander Kochetov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AutoTimestamp updated
parent
e4963f50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AutoTimestamp.php
framework/behaviors/AutoTimestamp.php
+4
-4
No files found.
framework/behaviors/AutoTimestamp.php
View file @
404a219a
...
...
@@ -27,8 +27,8 @@ use yii\db\ActiveRecord;
* }
* ~~~
*
* By default, AutoTimestamp will fill the `create
_time
` attribute with the current timestamp
* when the associated AR object is being inserted; it will fill the `update
_time
` attribute
* By default, AutoTimestamp will fill the `create
d_at
` attribute with the current timestamp
* when the associated AR object is being inserted; it will fill the `update
d_at
` attribute
* with the timestamp when the AR object is being updated.
*
* @author Qiang Xue <qiang.xue@gmail.com>
...
...
@@ -41,8 +41,8 @@ class AutoTimestamp extends Behavior
* The array keys are the ActiveRecord events upon which the attributes are to be filled with timestamps,
* and the array values are the corresponding attribute(s) to be updated. You can use a string to represent
* a single attribute, or an array to represent a list of attributes.
* The default setting is to update the `create
_time
` attribute upon AR insertion,
* and update the `update
_time
` attribute upon AR updating.
* The default setting is to update the `create
d_at
` attribute upon AR insertion,
* and update the `update
d_at
` attribute upon AR updating.
*/
public
$attributes
=
[
ActiveRecord
::
EVENT_BEFORE_INSERT
=>
'created_at'
,
...
...
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