Skip to content

Commit 0c13bbb

Browse files
author
Praesidiarius
committed
initial commit - features missing - coming in next commit
0 parents  commit 0c13bbb

26 files changed

Lines changed: 1402 additions & 0 deletions

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.vagrant/
2+
.idea/
3+
vendor/
4+
config/development.config.php
5+
public/themes/vuze
6+
public/themes/ablepro
7+
data/cache/*
8+
!data/cache/.gitkeep
9+
phpunit.xml
10+
composer.lock
11+
.phpunit.result.cache
12+
docs/html/

.travis.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
language: php
2+
3+
cache:
4+
directories:
5+
- $HOME/.composer/cache
6+
7+
env:
8+
global:
9+
- COMPOSER_ARGS="--no-interaction"
10+
- COVERAGE_DEPS="php-coveralls/php-coveralls"
11+
12+
matrix:
13+
fast_finish: true
14+
include:
15+
- php: 7.2
16+
env:
17+
- DEPS=lowest
18+
- php: 7.2
19+
env:
20+
- DEPS=latest
21+
- CS_CHECK=true
22+
23+
before_install:
24+
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
25+
26+
install:
27+
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
28+
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
29+
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
30+
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
31+
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
32+
- stty cols 120 && composer show
33+
34+
script:
35+
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
36+
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi
37+
38+
after_script:
39+
- if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi
40+
41+
notifications:
42+
email: false

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file, in reverse chronological order by release.
4+
5+
## 1.0.0 - TBD
6+
7+
### Added
8+
9+
- Its a composer package now
10+
11+
### Changed
12+
13+
- 100% of 0.9.x Codebase
14+
15+
### Deprecated
16+
17+
- 100% of 0.9.x Codebase
18+
19+
### Removed
20+
21+
- 100% of 0.9.x Codebase
22+
23+
### Fixed
24+
25+
- Removed dependencies

COPYRIGHT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Copyright (c) 2019-2020, Verein onePlace
2+
All rights reserved. (https://1plc.ch/)

LICENSE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright (c) 2019-2020, Verein onePlace
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
- Redistributions of source code must retain the above copyright notice, this
8+
list of conditions and the following disclaimer.
9+
10+
- Redistributions in binary form must reproduce the above copyright notice,
11+
this list of conditions and the following disclaimer in the documentation
12+
and/or other materials provided with the distribution.
13+
14+
- Neither the name of Verein onePlace nor the names of its contributors may
15+
be used to endorse or promote products derived from this software without
16+
specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
22+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
25+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# oneplace-task
2+
3+
[![Build Status](https://travis-ci.com/OnePlc/PLC_X_Task.svg?branch=master)](https://travis-ci.com/OnePlc/PLC_X_Task)
4+
[![Coverage Status](https://coveralls.io/repos/github/OnePlc/PLC_X_Task/badge.svg?branch=master)](https://coveralls.io/github/OnePlc/PLC_X_Task?branch=master)
5+
6+
## Introduction
7+
8+
This is the Task Module for onePlace Software Framework based on Laminas Project (former Zend Framework)
9+
10+
Create your web based apps on the fly! onePlace brings you extended Entity and Table Models,
11+
View Helpers and much more - so you can build your Webapp to manage database based data,
12+
in almost any layout you can image.
13+
14+
onePlace is built for maximum freedom of choice for your app, and so only small
15+
parts of laminas mvc are utilized. a lot is done from scratch to give you more freedom / customization.
16+
17+
## Task Module
18+
19+
This task module is a starting point for your own onePlace modules.
20+
It expands on [oneplace-core](https://github.com/OnePlc/PLC_X_Core) and uses the onePlace / Laminas MVC layer and module systems.
21+
22+
## Installation
23+
24+
The easiest way to install onePlace Task is via composer
25+
```shell script
26+
composer require oneplace/oneplace-task
27+
```
28+
29+
## Getting started
30+
31+
how to utilize user manager
32+
33+
how to create own modules
34+
35+
## Documentation
36+
37+
Documentation will be extended soon.

composer.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"name": "oneplace/oneplace-task",
3+
"description": "onePlace Task Module",
4+
"type": "oneplace-module",
5+
"license": "BSD-3-Clause",
6+
"keywords": [
7+
"laminas",
8+
"mvc",
9+
"task",
10+
"oneplace",
11+
"framework"
12+
],
13+
"require-dev": {
14+
"phpunit/phpunit": "^8",
15+
"oneplace/oneplace-core": "^1.0.0",
16+
"laminas/laminas-test": "^3.3.0"
17+
},
18+
"require": {
19+
"php": "^7.1",
20+
"oneplace/oneplace-core": "^1.0.0"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"OnePlace\\Task\\": "src/"
25+
}
26+
},
27+
"autoload-dev": {
28+
"psr-4": {
29+
"OnePlaceTest\\Task\\": "test/"
30+
}
31+
},
32+
"scripts": {
33+
"cs-check": "phpcs",
34+
"cs-fix": "phpcbf",
35+
"development-disable": "laminas-development-mode disable",
36+
"development-enable": "laminas-development-mode enable",
37+
"development-status": "laminas-development-mode status",
38+
"post-create-project-cmd": [
39+
"@development-enable",
40+
"php -r '$file = file_get_contents(\".gitignore\"); $file = str_replace(\"composer.lock\", \"\", $file); file_put_contents(\".gitignore\", $file);'"
41+
],
42+
"serve": "php -S 0.0.0.0:8080 -t public",
43+
"test": "phpunit"
44+
},
45+
"extra": {
46+
"zf": {
47+
"module": "OnePlace\\Task"
48+
}
49+
}
50+
}

config/module.config.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
/**
3+
* module.config.php - Task Config
4+
*
5+
* Main Config File for Task Module
6+
*
7+
* @category Config
8+
* @package Task
9+
* @author Verein onePlace
10+
* @copyright (C) 2020 Verein onePlace <admin@1plc.ch>
11+
* @license https://opensource.org/licenses/BSD-3-Clause
12+
* @version 1.0.0
13+
* @since 1.0.0
14+
*/
15+
16+
namespace OnePlace\Task;
17+
18+
use Laminas\Router\Http\Literal;
19+
use Laminas\Router\Http\Segment;
20+
use Laminas\ServiceManager\Factory\InvokableFactory;
21+
22+
return [
23+
# Task Module - Routes
24+
'router' => [
25+
'routes' => [
26+
# Module Basic Route
27+
'task' => [
28+
'type' => Segment::class,
29+
'options' => [
30+
'route' => '/task[/:action[/:id]]',
31+
'constraints' => [
32+
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
33+
'id' => '[0-9]+',
34+
],
35+
'defaults' => [
36+
'controller' => Controller\TaskController::class,
37+
'action' => 'index',
38+
],
39+
],
40+
],
41+
'task-api' => [
42+
'type' => Segment::class,
43+
'options' => [
44+
'route' => '/task/api[/:action[/:id]]',
45+
'constraints' => [
46+
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
47+
'id' => '[0-9]+',
48+
],
49+
'defaults' => [
50+
'controller' => Controller\ApiController::class,
51+
'action' => 'index',
52+
],
53+
],
54+
],
55+
],
56+
],
57+
58+
# View Settings
59+
'view_manager' => [
60+
'template_path_stack' => [
61+
'task' => __DIR__ . '/../view',
62+
],
63+
],
64+
];

data/createmodulefromskeleton.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$sModuleName = "Article"
2+
$sModuleKey = "article"
3+
$sTargetDir = "C:\Users\Praesidiarius\PhpstormProjects\OS\PLC_X_Article_NoGIT"
4+
5+
# Copy Task
6+
Copy-Item -Path "..\*" -Destination "$sTargetDir" -recurse -Force

data/install.sql

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--
2+
-- Base Table
3+
--
4+
CREATE TABLE `task` (
5+
`Task_ID` int(11) NOT NULL,
6+
`label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
7+
`created_by` int(11) NOT NULL,
8+
`created_date` datetime NOT NULL,
9+
`modified_by` int(11) NOT NULL,
10+
`modified_date` datetime NOT NULL
11+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
12+
13+
ALTER TABLE `task`
14+
ADD PRIMARY KEY (`Task_ID`);
15+
16+
ALTER TABLE `task`
17+
MODIFY `Task_ID` int(11) NOT NULL AUTO_INCREMENT;
18+
19+
--
20+
-- Permissions
21+
--
22+
INSERT INTO `permission` (`permission_key`, `module`, `label`, `nav_label`, `nav_href`, `show_in_menu`) VALUES
23+
('add', 'OnePlace\\Task\\Controller\\TaskController', 'Add', '', '', 0),
24+
('edit', 'OnePlace\\Task\\Controller\\TaskController', 'Edit', '', '', 0),
25+
('index', 'OnePlace\\Task\\Controller\\TaskController', 'Index', 'Tasks', '/task', 1),
26+
('list', 'OnePlace\\Task\\Controller\\ApiController', 'List', '', '', 1),
27+
('view', 'OnePlace\\Task\\Controller\\TaskController', 'View', '', '', 0);
28+
29+
--
30+
-- Form
31+
--
32+
INSERT INTO `core_form` (`form_key`, `label`) VALUES ('task-single', 'Task');
33+
34+
--
35+
-- Index List
36+
--
37+
INSERT INTO `core_index_table` (`table_name`, `form`, `label`) VALUES
38+
('task-index', 'task-single', 'Task Index');
39+
40+
--
41+
-- Tabs
42+
--
43+
INSERT INTO `core_form_tab` (`Tab_ID`, `form`, `title`, `subtitle`, `icon`, `counter`, `sort_id`, `filter_check`, `filter_value`) VALUES ('task-base', 'task-single', 'Task', 'Base', 'fas fa-cogs', '', '0', '', '');
44+
45+
--
46+
-- Buttons
47+
--
48+
INSERT INTO `core_form_button` (`Button_ID`, `label`, `icon`, `title`, `href`, `class`, `append`, `form`, `mode`, `filter_check`, `filter_value`) VALUES
49+
(NULL, 'Save Task', 'fas fa-save', 'Save Task', '#', 'primary saveForm', '', 'task-single', 'link', '', ''),
50+
(NULL, 'Edit Task', 'fas fa-edit', 'Edit Task', '/task/edit/##ID##', 'primary', '', 'task-view', 'link', '', ''),
51+
(NULL, 'Add Task', 'fas fa-plus', 'Add Task', '/task/add', 'primary', '', 'task-index', 'link', '', '');
52+
53+
--
54+
-- Fields
55+
--
56+
INSERT INTO `core_form_field` (`Field_ID`, `type`, `label`, `fieldkey`, `tab`, `form`, `class`, `url_view`, `url_ist`, `show_widget_left`, `allow_clear`, `readonly`, `tbl_cached_name`, `tbl_class`, `tbl_permission`) VALUES
57+
(NULL, 'text', 'Name', 'label', 'task-base', 'task-single', 'col-md-3', '/task/view/##ID##', '', 0, 1, 0, '', '', '');
58+
59+
COMMIT;

0 commit comments

Comments
 (0)