Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Commit 0a6d558

Browse files
committed
updated documentation in datetools class
1 parent 4926008 commit 0a6d558

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

Diff for: datetools.php

+36-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* PHP version 5.6+
1111
*
12-
* @package Events
12+
* @package DateTools
1313
* @author Kaleb Heitzman <[email protected]>
1414
* @copyright 2016 Kaleb Heitzman
1515
* @license https://opensource.org/licenses/MIT MIT
@@ -22,9 +22,29 @@
2222

2323
use Grav\Common\Plugin;
2424

25+
/**
26+
* DateTools Class
27+
*
28+
* The DateTools Plugin provides provides date tools to use inside of Twig
29+
* for filtering pages. With the release of Grav 0.9.13 `startDate` and
30+
* `endDate` were introduced to collection parsing. You can use the
31+
* following `datetools` to set various dates for retrieving collections.
32+
*
33+
* @package DateTools
34+
* @author Kaleb Heitzman <[email protected]>
35+
* @version 1.0.6
36+
* @since 1.0.0 Initial Release
37+
* @todo Implement Date Formats
38+
* @todo Implement ICS Feeds
39+
* @todo Implement All Day Option
40+
*/
2541
class DateToolsPlugin extends Plugin
2642
{
2743
/**
44+
* Get Subscribed Events
45+
*
46+
* @since 1.0.0 Initial Release
47+
*
2848
* @return array
2949
*/
3050
public static function getSubscribedEvents()
@@ -35,7 +55,13 @@ public static function getSubscribedEvents()
3555
}
3656

3757
/**
38-
* Initialize configuration
58+
* Initialize plugin configuration
59+
*
60+
* Initialize twig site variables hook to allow formatting
61+
*
62+
* @since 1.0.0 Initial Release
63+
*
64+
* @return void
3965
*/
4066
public function onPluginsInitialized()
4167
{
@@ -50,7 +76,14 @@ public function onPluginsInitialized()
5076
}
5177

5278
/**
53-
* Set needed variables to display events
79+
* Add datetools variable
80+
*
81+
* Add datetools variable to twig templates for use in filtering
82+
* collections
83+
*
84+
* @since 1.0.0 Initial Release
85+
*
86+
* @return void
5487
*/
5588
public function onTwigSiteVariables()
5689
{

0 commit comments

Comments
 (0)