Columns
6 months ago
Groups
1 year ago
Table.php
5 months ago
Table_Campaigns.php
9 months ago
Table_Clicks.php
5 months ago
Table_Devices.php
5 months ago
Table_Geo.php
9 months ago
Table_Journeys.php
5 months ago
Table_Pages.php
5 months ago
Table_Referrers.php
9 months ago
Table_Clicks.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\Tables; |
| 4 | |
| 5 | use IAWP\ColumnOptions\Options; |
| 6 | use IAWP\ColumnOptions\Plugins\LinkPatterns; |
| 7 | use IAWP\Rows\Link_Patterns; |
| 8 | use IAWP\Rows\Links; |
| 9 | use IAWP\Statistics\Click_Statistics; |
| 10 | use IAWP\Tables\Columns\Column; |
| 11 | use IAWP\Tables\Groups\Group; |
| 12 | use IAWP\Tables\Groups\Groups; |
| 13 | /** @internal */ |
| 14 | class Table_Clicks extends \IAWP\Tables\Table |
| 15 | { |
| 16 | protected $default_sorting_column = 'link_clicks'; |
| 17 | public function id() : string |
| 18 | { |
| 19 | return 'clicks'; |
| 20 | } |
| 21 | protected function groups() : Groups |
| 22 | { |
| 23 | $groups = []; |
| 24 | $groups[] = new Group('link', \__('Links', 'independent-analytics'), 'link_target', Links::class, Click_Statistics::class); |
| 25 | $groups[] = new Group('link_pattern', \__('Link Patterns', 'independent-analytics'), 'link_name', Link_Patterns::class, Click_Statistics::class); |
| 26 | return new Groups($groups); |
| 27 | } |
| 28 | protected function local_columns() : array |
| 29 | { |
| 30 | $columns = [new Column(['id' => 'link_name', 'name' => \__('Link Pattern', 'independent-analytics'), 'visible' => \true, 'type' => 'select', 'options' => new Options(new LinkPatterns()), 'separate_filter_column' => 'link_rules.link_rule_id', 'is_concrete_column' => \true]), new Column(['id' => 'link_target', 'name' => \__('Target', 'independent-analytics'), 'visible' => \true, 'type' => 'string', 'unavailable_for' => ['link_pattern'], 'separate_database_column' => 'target', 'is_concrete_column' => \true]), new Column(['id' => 'link_clicks', 'name' => \__('Clicks', 'independent-analytics'), 'visible' => \true, 'type' => 'int', 'aggregatable' => \true])]; |
| 31 | return $columns; |
| 32 | } |
| 33 | } |
| 34 |