This repository has been archived by the owner on Apr 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
2,497 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,22 @@ | ||
<?php | ||
/** | ||
* Grav DateTools Plugin | ||
* | ||
* The DateTools Plugin provides provides date tools to use inside of Twig | ||
* for filtering pages. With the release of Grav 0.9.13 `startDate` and | ||
* `endDate` were introduced to collection parsing. You can use the | ||
* following `datetools` to set various dates for retrieving collections. | ||
* | ||
* PHP version 5.6+ | ||
* | ||
* @package DateTools | ||
* @author Kaleb Heitzman <[email protected]> | ||
* @copyright 2016 Kaleb Heitzman | ||
* @license https://opensource.org/licenses/MIT MIT | ||
* @version 1.0.6 | ||
* @link https://github.com/kalebheitzman/grav-plugin-datetools | ||
* @since 1.0.0 Initial Release | ||
*/ | ||
|
||
namespace Grav\Plugin; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,50 @@ | ||
<?php | ||
/** | ||
* Grav DateTools Plugin | ||
* | ||
* The DateTools Plugin provides provides date tools to use inside of Twig | ||
* for filtering pages. With the release of Grav 0.9.13 `startDate` and | ||
* `endDate` were introduced to collection parsing. You can use the | ||
* following `datetools` to set various dates for retrieving collections. | ||
* | ||
* PHP version 5.6+ | ||
* | ||
* @package DateTools | ||
* @author Kaleb Heitzman <[email protected]> | ||
* @copyright 2016 Kaleb Heitzman | ||
* @license https://opensource.org/licenses/MIT MIT | ||
* @version 1.0.6 | ||
* @link https://github.com/kalebheitzman/grav-plugin-datetools | ||
* @since 1.0.0 Initial Release | ||
*/ | ||
|
||
namespace Grav\Plugin; | ||
|
||
use Grav\Common\Plugin; | ||
|
||
/** | ||
* DateTools Class | ||
* | ||
* The DateTools Plugin provides provides date tools to use inside of Twig | ||
* for filtering pages. With the release of Grav 0.9.13 `startDate` and | ||
* `endDate` were introduced to collection parsing. You can use the | ||
* following `datetools` to set various dates for retrieving collections. | ||
* | ||
* @package DateTools | ||
* @author Kaleb Heitzman <[email protected]> | ||
* @version 1.0.6 | ||
* @since 1.0.0 Initial Release | ||
* @todo Implement Date Formats | ||
* @todo Implement ICS Feeds | ||
* @todo Implement All Day Option | ||
*/ | ||
class DateToolsPlugin extends Plugin | ||
{ | ||
/** | ||
* Get Subscribed Events | ||
* | ||
* @since 1.0.0 Initial Release | ||
* | ||
* @return array | ||
*/ | ||
public static function getSubscribedEvents() | ||
|
@@ -17,7 +55,13 @@ public static function getSubscribedEvents() | |
} | ||
|
||
/** | ||
* Initialize configuration | ||
* Initialize plugin configuration | ||
* | ||
* Initialize twig site variables hook to allow formatting | ||
* | ||
* @since 1.0.0 Initial Release | ||
* | ||
* @return void | ||
*/ | ||
public function onPluginsInitialized() | ||
{ | ||
|
@@ -32,7 +76,14 @@ public function onPluginsInitialized() | |
} | ||
|
||
/** | ||
* Set needed variables to display events | ||
* Add datetools variable | ||
* | ||
* Add datetools variable to twig templates for use in filtering | ||
* collections | ||
* | ||
* @since 1.0.0 Initial Release | ||
* | ||
* @return void | ||
*/ | ||
public function onTwigSiteVariables() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,7 @@ | |
namespace Composer\Autoload; | ||
|
||
/** | ||
* ClassLoader implements a PSR-0 class loader | ||
* | ||
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md | ||
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader. | ||
* | ||
* $loader = new \Composer\Autoload\ClassLoader(); | ||
* | ||
|
@@ -39,6 +37,8 @@ | |
* | ||
* @author Fabien Potencier <[email protected]> | ||
* @author Jordi Boggiano <[email protected]> | ||
* @see http://www.php-fig.org/psr/psr-0/ | ||
* @see http://www.php-fig.org/psr/psr-4/ | ||
*/ | ||
class ClassLoader | ||
{ | ||
|
@@ -147,7 +147,7 @@ public function add($prefix, $paths, $prepend = false) | |
* appending or prepending to the ones previously set for this namespace. | ||
* | ||
* @param string $prefix The prefix/namespace, with trailing '\\' | ||
* @param array|string $paths The PSR-0 base directories | ||
* @param array|string $paths The PSR-4 base directories | ||
* @param bool $prepend Whether to prepend the directories | ||
* | ||
* @throws \InvalidArgumentException | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,66 @@ | ||
[ | ||
{ | ||
"name": "nesbot/carbon", | ||
"version": "1.21.0", | ||
"version_normalized": "1.21.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/briannesbitt/Carbon.git", | ||
"reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", | ||
"reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", | ||
"shasum": "" | ||
}, | ||
"require": { | ||
"php": ">=5.3.0", | ||
"symfony/translation": "~2.6|~3.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~4.0|~5.0" | ||
}, | ||
"time": "2015-11-04 20:07:17", | ||
"type": "library", | ||
"installation-source": "dist", | ||
"autoload": { | ||
"psr-4": { | ||
"Carbon\\": "src/Carbon/" | ||
} | ||
}, | ||
"notification-url": "https://packagist.org/downloads/", | ||
"license": [ | ||
"MIT" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Brian Nesbitt", | ||
"email": "[email protected]", | ||
"homepage": "http://nesbot.com" | ||
} | ||
], | ||
"description": "A simple API extension for DateTime.", | ||
"homepage": "http://carbon.nesbot.com", | ||
"keywords": [ | ||
"date", | ||
"datetime", | ||
"time" | ||
] | ||
}, | ||
{ | ||
"name": "symfony/polyfill-mbstring", | ||
"version": "v1.1.0", | ||
"version_normalized": "1.1.0.0", | ||
"version": "v1.2.0", | ||
"version_normalized": "1.2.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/symfony/polyfill-mbstring.git", | ||
"reference": "1289d16209491b584839022f29257ad859b8532d" | ||
"reference": "dff51f72b0706335131b00a7f49606168c582594" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/1289d16209491b584839022f29257ad859b8532d", | ||
"reference": "1289d16209491b584839022f29257ad859b8532d", | ||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/dff51f72b0706335131b00a7f49606168c582594", | ||
"reference": "dff51f72b0706335131b00a7f49606168c582594", | ||
"shasum": "" | ||
}, | ||
"require": { | ||
|
@@ -20,11 +69,11 @@ | |
"suggest": { | ||
"ext-mbstring": "For best performance" | ||
}, | ||
"time": "2016-01-20 09:13:37", | ||
"time": "2016-05-18 14:26:46", | ||
"type": "library", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "1.1-dev" | ||
"dev-master": "1.2-dev" | ||
} | ||
}, | ||
"installation-source": "dist", | ||
|
@@ -62,17 +111,17 @@ | |
}, | ||
{ | ||
"name": "symfony/translation", | ||
"version": "v3.0.2", | ||
"version_normalized": "3.0.2.0", | ||
"version": "v3.1.3", | ||
"version_normalized": "3.1.3.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/symfony/translation.git", | ||
"reference": "2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91" | ||
"reference": "7713ddf81518d0823b027fe74ec390b80f6b6536" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/symfony/translation/zipball/2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91", | ||
"reference": "2de0b6f7ebe43cffd8a06996ebec6aab79ea9e91", | ||
"url": "https://api.github.com/repos/symfony/translation/zipball/7713ddf81518d0823b027fe74ec390b80f6b6536", | ||
"reference": "7713ddf81518d0823b027fe74ec390b80f6b6536", | ||
"shasum": "" | ||
}, | ||
"require": { | ||
|
@@ -93,11 +142,11 @@ | |
"symfony/config": "", | ||
"symfony/yaml": "" | ||
}, | ||
"time": "2016-02-02 13:44:19", | ||
"time": "2016-07-26 08:04:17", | ||
"type": "library", | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "3.0-dev" | ||
"dev-master": "3.1-dev" | ||
} | ||
}, | ||
"installation-source": "dist", | ||
|
@@ -125,54 +174,5 @@ | |
], | ||
"description": "Symfony Translation Component", | ||
"homepage": "https://symfony.com" | ||
}, | ||
{ | ||
"name": "nesbot/carbon", | ||
"version": "1.21.0", | ||
"version_normalized": "1.21.0.0", | ||
"source": { | ||
"type": "git", | ||
"url": "https://github.com/briannesbitt/Carbon.git", | ||
"reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" | ||
}, | ||
"dist": { | ||
"type": "zip", | ||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", | ||
"reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", | ||
"shasum": "" | ||
}, | ||
"require": { | ||
"php": ">=5.3.0", | ||
"symfony/translation": "~2.6|~3.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "~4.0|~5.0" | ||
}, | ||
"time": "2015-11-04 20:07:17", | ||
"type": "library", | ||
"installation-source": "dist", | ||
"autoload": { | ||
"psr-4": { | ||
"Carbon\\": "src/Carbon/" | ||
} | ||
}, | ||
"notification-url": "https://packagist.org/downloads/", | ||
"license": [ | ||
"MIT" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Brian Nesbitt", | ||
"email": "[email protected]", | ||
"homepage": "http://nesbot.com" | ||
} | ||
], | ||
"description": "A simple API extension for DateTime.", | ||
"homepage": "http://carbon.nesbot.com", | ||
"keywords": [ | ||
"date", | ||
"datetime", | ||
"time" | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.