Skip to content

Commit

Permalink
Improved skaleton
Browse files Browse the repository at this point in the history
  • Loading branch information
landsman committed Feb 5, 2017
1 parent d73da4c commit 414cb2a
Show file tree
Hide file tree
Showing 8 changed files with 135 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,28 @@
# GoogleDataLayer
Nette framework plugin - Google data layer (JS) for dynamic remarketing

Installation
------------

The best way to install Mk/Feed is using [Composer](http:https://getcomposer.org/):

```sh
$ composer require studioartcz/googledatalayer
```

Configuration
-------------

.neon
```yml
extensions:
feed: StudioArtcz\GoogleDataLayer\DI\GoogleDataLayerExtension

googleDataLayer:
gtmId: '%gtmId%'
```

Usage
-----

todo
44 changes: 44 additions & 0 deletions src/Command/GoogleDataLayerCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

namespace StudioArtCz\GoogleDataLayer\Command;

use Symfony\Component\Console\Command\Command,
Symfony\Component\Console\Input\InputInterface,
Symfony\Component\Console\Output\OutputInterface,
Symfony\Component\Console\Input\InputOption;

/**
* see: https://github.com/martinknor/feed/blob/master/src/Command/FeedCommand.php
* Class GoogleDataLayerCommand
* @package StudioArtCz\GoogleDataLayer\Command
*/
class GoogleDataLayerCommand extends Command
{

/** @var \Nette\DI\Container */
private $container;

/** @var array */
private $config;

public function __construct(array $config = array(), Nette\DI\Container $container)
{
parent::__construct();
$this->container = $container;
$this->config = $config;
}

protected function configure()
{
$this->setName('GTM:info')
->setDescription('todo');
//->addOption('show', 's', InputOption::VALUE_NONE, 'Print available exports')
//->addOption('feed', 'f', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL);
}

protected function execute(InputInterface $input, OutputInterface $output)
{

}

}
15 changes: 15 additions & 0 deletions src/DI/GoogleDataLayerExtension.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use Nette;

/**
* see: https://github.com/martinknor/feed/blob/d577ff9c43b01b230ac298cc8e5efbf912806200/src/DI/FeedExtension.php
* Class FeedExtension
*/
class GoogleDataLayerExtension extends Nette\DI\CompilerExtension
{
/** @var array */
private $defaults = array(
'gtmId' => '%gtmId%'
);
}
11 changes: 11 additions & 0 deletions src/GoogleDataLayer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace StudioArtCz;

/**
* Class GoogleDataLayer
* @package StudioArtCz
*/
class GoogleDataLayer
{
}
10 changes: 10 additions & 0 deletions src/Pages/BasePage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace StudioArtCz\GoogleDataLayer\Pages;

use Nette;

abstract class BasePage extends Nette\Object implements StudioArtCz\GoogleDataLayer\Pages\IPage;
{

}
15 changes: 15 additions & 0 deletions src/Pages/Ecommerce/Product.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace StudioArtcz\GoogleDataLayer\Pages\Ecommerce;

use StudioArtCz\GoogleDataLayer\Pages\BasePage;
use Nette;

/**
* see: https://github.com/martinknor/feed/blob/master/src/Generators/Zbozi/Item.php
* Class
*/
class Product extends BasePage
{

}
3 changes: 3 additions & 0 deletions src/Pages/Ecommerce/latte/product.latte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script n:syntax="off">
var todo = "javascript";
</script>
11 changes: 11 additions & 0 deletions src/Pages/IPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace StudioArtCz\GoogleDataLayer\Pages;

interface IPage
{
/**
* @return bool Return true if item is valid
*/
public function validate();
}

0 comments on commit 414cb2a

Please sign in to comment.