9
9
*
10
10
* PHP version 5.6+
11
11
*
12
- * @package Events
12
+ * @package DateTools
13
13
* @author Kaleb Heitzman <[email protected] >
14
14
* @copyright 2016 Kaleb Heitzman
15
15
* @license https://opensource.org/licenses/MIT MIT
22
22
23
23
use Grav \Common \Plugin ;
24
24
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
+ */
25
41
class DateToolsPlugin extends Plugin
26
42
{
27
43
/**
44
+ * Get Subscribed Events
45
+ *
46
+ * @since 1.0.0 Initial Release
47
+ *
28
48
* @return array
29
49
*/
30
50
public static function getSubscribedEvents ()
@@ -35,7 +55,13 @@ public static function getSubscribedEvents()
35
55
}
36
56
37
57
/**
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
39
65
*/
40
66
public function onPluginsInitialized ()
41
67
{
@@ -50,7 +76,14 @@ public function onPluginsInitialized()
50
76
}
51
77
52
78
/**
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
54
87
*/
55
88
public function onTwigSiteVariables ()
56
89
{
0 commit comments