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

Commit

Permalink
Merge branch 'release/1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalebheitzman committed Aug 19, 2016
2 parents 1123a8d + 66cb454 commit 8a728a8
Show file tree
Hide file tree
Showing 35 changed files with 2,497 additions and 146 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v1.0.6
## 08/18/2016
1 [](#improved)
* Updated code documentation
* Updated vendor packages
1 [](#bugfix)
* Fixed Issue #6 & Issue #7- tag structure (deleted tabs v1.0.0, v1.0.1, v1.0.2)

# v1.0.5
## 07/04/2016
1 [](#bugfix)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Date tools plugin for Grav CMS

*This plugin works with Grav v1.1.0-rc.3 and above.*
*This plugin works with Grav v1.1.3 and above.*

This [Grav](http://getgrav.org) plugin 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.](http://learn.getgrav.org/content/collections)

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Date Tools
version: 1.0.5
version: 1.0.6
description: "This plugin provides date tools to twig inside of Grav CMS using the [Carbon](https://github.com/briannesbitt/Carbon) DateTime api extension."
icon: clock-o
author:
Expand Down
18 changes: 18 additions & 0 deletions classes/datetools.php
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;

Expand Down
55 changes: 53 additions & 2 deletions datetools.php
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()
Expand All @@ -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()
{
Expand All @@ -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()
{
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
*
Expand All @@ -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
{
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

Copyright (c) 2015 Nils Adermann, Jordi Boggiano
Copyright (c) 2016 Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
$baseDir = dirname($vendorDir);

return array(
$vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
);
12 changes: 8 additions & 4 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@ public static function getLoader()
$loader->register(true);

$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
composerRequiree295126151982f6a5c5df7ff7e3749b4($file);
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiree295126151982f6a5c5df7ff7e3749b4($fileIdentifier, $file);
}

return $loader;
}
}

function composerRequiree295126151982f6a5c5df7ff7e3749b4($file)
function composerRequiree295126151982f6a5c5df7ff7e3749b4($fileIdentifier, $file)
{
require $file;
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
126 changes: 63 additions & 63 deletions vendor/composer/installed.json
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": {
Expand All @@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -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",
Expand Down Expand Up @@ -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"
]
}
]
4 changes: 2 additions & 2 deletions vendor/symfony/polyfill-mbstring/Mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ private static function title_case_upper($s)

private static function getData($file)
{
if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.ser')) {
return unserialize(file_get_contents($file));
if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) {
return require $file;
}

return false;
Expand Down
Loading

0 comments on commit 8a728a8

Please sign in to comment.