-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit e94bf7c
Showing
30 changed files
with
1,865 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.vagrant/ | ||
.idea/ | ||
vendor/ | ||
config/development.config.php | ||
public/themes/vuze | ||
public/themes/ablepro | ||
data/cache/* | ||
!data/cache/.gitkeep | ||
phpunit.xml | ||
composer.lock | ||
.phpunit.result.cache | ||
docs/html/ |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
language: php | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
env: | ||
global: | ||
- COMPOSER_ARGS="--no-interaction" | ||
- COVERAGE_DEPS="php-coveralls/php-coveralls" | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- php: 7.2 | ||
env: | ||
- DEPS=lowest | ||
- php: 7.2 | ||
env: | ||
- DEPS=latest | ||
- CS_CHECK=true | ||
|
||
before_install: | ||
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi | ||
|
||
install: | ||
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs | ||
- if [[ $LEGACY_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi | ||
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi | ||
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi | ||
- stty cols 120 && composer show | ||
|
||
script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi | ||
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi | ||
|
||
after_script: | ||
- if [[ $TEST_COVERAGE == 'true' ]]; then vendor/bin/php-coveralls -v ; fi | ||
|
||
notifications: | ||
email: false |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file, in reverse chronological order by release. | ||
|
||
## 1.0.0 - TBD | ||
|
||
### Added | ||
|
||
- Its a composer package now | ||
|
||
### Changed | ||
|
||
- 100% of 0.9.x Codebase | ||
|
||
### Deprecated | ||
|
||
- 100% of 0.9.x Codebase | ||
|
||
### Removed | ||
|
||
- 100% of 0.9.x Codebase | ||
|
||
### Fixed | ||
|
||
- Removed dependencies |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Copyright (c) 2019-2020, Verein onePlace | ||
All rights reserved. (https://1plc.ch/) |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2019-2020, Verein onePlace | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
- Neither the name of Verein onePlace nor the names of its contributors may | ||
be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# oneplace-book | ||
|
||
[![Build Status](https://travis-ci.com/OnePlc/PLC_X_Book.svg?branch=master)](https://travis-ci.com/OnePlc/PLC_X_Book) | ||
[![Coverage Status](https://coveralls.io/repos/github/OnePlc/PLC_X_Book/badge.svg?branch=master)](https://coveralls.io/github/OnePlc/PLC_X_Book?branch=master) | ||
|
||
## Introduction | ||
|
||
This is the Book Module for onePlace Software Framework based on Laminas Project (former Zend Framework) | ||
|
||
Create your web based apps on the fly! onePlace brings you extended Entity and Table Models, | ||
View Helpers and much more - so you can build your Webapp to manage database based data, | ||
in almost any layout you can image. | ||
|
||
onePlace is built for maximum freedom of choice for your app, and so only small | ||
parts of laminas mvc are utilized. a lot is done from scratch to give you more freedom / customization. | ||
|
||
## Book Module | ||
|
||
This book module is a starting point for your own onePlace modules. | ||
It expands on [oneplace-core](https://github.com/OnePlc/PLC_X_Core) and uses the onePlace / Laminas MVC layer and module systems. | ||
|
||
## Installation | ||
|
||
The easiest way to install onePlace Book is via composer | ||
```shell script | ||
composer require oneplace/oneplace-book | ||
``` | ||
|
||
## Getting started | ||
|
||
how to utilize user manager | ||
|
||
how to create own modules | ||
|
||
## Documentation | ||
|
||
Documentation will be extended soon. |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "oneplace/oneplace-book", | ||
"description": "onePlace Book Module", | ||
"type": "oneplace-module", | ||
"license": "BSD-3-Clause", | ||
"keywords": [ | ||
"laminas", | ||
"mvc", | ||
"book", | ||
"oneplace", | ||
"oneplace-module", | ||
"framework" | ||
], | ||
"require-dev": { | ||
"phpunit/phpunit": "^8", | ||
"oneplace/oneplace-core": "^1.0.0", | ||
"laminas/laminas-test": "^3.3.0" | ||
}, | ||
"require": { | ||
"php": "^7.1", | ||
"oneplace/oneplace-core": "^1.0.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"OnePlace\\Book\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"OnePlaceTest\\Book\\": "test/" | ||
} | ||
}, | ||
"scripts": { | ||
"cs-check": "phpcs", | ||
"cs-fix": "phpcbf", | ||
"development-disable": "laminas-development-mode disable", | ||
"development-enable": "laminas-development-mode enable", | ||
"development-status": "laminas-development-mode status", | ||
"post-create-project-cmd": [ | ||
"@development-enable", | ||
"php -r '$file = file_get_contents(\".gitignore\"); $file = str_replace(\"composer.lock\", \"\", $file); file_put_contents(\".gitignore\", $file);'" | ||
], | ||
"serve": "php -S 0.0.0.0:8080 -t public", | ||
"test": "phpunit" | ||
}, | ||
"extra": { | ||
"zf": { | ||
"module": "OnePlace\\Book" | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
/** | ||
* module.config.php - Book Config | ||
* | ||
* Main Config File for Book Module | ||
* | ||
* @category Config | ||
* @package Book | ||
* @author Verein onePlace | ||
* @copyright (C) 2020 Verein onePlace <[email protected]> | ||
* @license https://opensource.org/licenses/BSD-3-Clause | ||
* @version 1.0.0 | ||
* @since 1.0.0 | ||
*/ | ||
|
||
namespace OnePlace\Book; | ||
|
||
use Laminas\Router\Http\Literal; | ||
use Laminas\Router\Http\Segment; | ||
use Laminas\ServiceManager\Factory\InvokableFactory; | ||
|
||
return [ | ||
# Book Module - Routes | ||
'router' => [ | ||
'routes' => [ | ||
# Module Basic Route | ||
'book' => [ | ||
'type' => Segment::class, | ||
'options' => [ | ||
'route' => '/book[/:action[/:id]]', | ||
'constraints' => [ | ||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
'id' => '[0-9]+', | ||
], | ||
'defaults' => [ | ||
'controller' => Controller\BookController::class, | ||
'action' => 'index', | ||
], | ||
], | ||
], | ||
'book-api' => [ | ||
'type' => Segment::class, | ||
'options' => [ | ||
'route' => '/book/api[/:action[/:id]]', | ||
'constraints' => [ | ||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*', | ||
'id' => '[0-9]+', | ||
], | ||
'defaults' => [ | ||
'controller' => Controller\ApiController::class, | ||
'action' => 'index', | ||
], | ||
], | ||
], | ||
], | ||
], | ||
|
||
# View Settings | ||
'view_manager' => [ | ||
'template_path_stack' => [ | ||
'book' => __DIR__ . '/../view', | ||
], | ||
], | ||
]; |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$sModuleName = "Article" | ||
$sModuleKey = "article" | ||
$sTargetDir = "C:\Users\Praesidiarius\PhpstormProjects\OS\PLC_X_Article_NoGIT" | ||
|
||
# Copy Book | ||
Copy-Item -Path "..\*" -Destination "$sTargetDir" -recurse -Force |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
-- | ||
-- Base Table | ||
-- | ||
CREATE TABLE `book` ( | ||
`Book_ID` int(11) NOT NULL, | ||
`label` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, | ||
`created_by` int(11) NOT NULL, | ||
`created_date` datetime NOT NULL, | ||
`modified_by` int(11) NOT NULL, | ||
`modified_date` datetime NOT NULL | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; | ||
|
||
ALTER TABLE `book` | ||
ADD PRIMARY KEY (`Book_ID`); | ||
|
||
ALTER TABLE `book` | ||
MODIFY `Book_ID` int(11) NOT NULL AUTO_INCREMENT; | ||
|
||
-- | ||
-- Permissions | ||
-- | ||
INSERT INTO `permission` (`permission_key`, `module`, `label`, `nav_label`, `nav_href`, `show_in_menu`) VALUES | ||
('add', 'OnePlace\\Book\\Controller\\BookController', 'Add', '', '', 0), | ||
('edit', 'OnePlace\\Book\\Controller\\BookController', 'Edit', '', '', 0), | ||
('index', 'OnePlace\\Book\\Controller\\BookController', 'Index', 'Books', '/book', 1), | ||
('list', 'OnePlace\\Book\\Controller\\ApiController', 'List', '', '', 1), | ||
('view', 'OnePlace\\Book\\Controller\\BookController', 'View', '', '', 0); | ||
|
||
-- | ||
-- Form | ||
-- | ||
INSERT INTO `core_form` (`form_key`, `label`, `entity_class`, `entity_tbl_class`) VALUES | ||
('book-single', 'Book', 'OnePlace\\Book\\Model\\Book', 'OnePlace\\Book\\Model\\BookTable'); | ||
|
||
-- | ||
-- Index List | ||
-- | ||
INSERT INTO `core_index_table` (`table_name`, `form`, `label`) VALUES | ||
('book-index', 'book-single', 'Book Index'); | ||
|
||
-- | ||
-- Tabs | ||
-- | ||
INSERT INTO `core_form_tab` (`Tab_ID`, `form`, `title`, `subtitle`, `icon`, `counter`, `sort_id`, `filter_check`, `filter_value`) VALUES ('book-base', 'book-single', 'Book', 'Base', 'fas fa-cogs', '', '0', '', ''); | ||
|
||
-- | ||
-- Buttons | ||
-- | ||
INSERT INTO `core_form_button` (`Button_ID`, `label`, `icon`, `title`, `href`, `class`, `append`, `form`, `mode`, `filter_check`, `filter_value`) VALUES | ||
(NULL, 'Save Book', 'fas fa-save', 'Save Book', '#', 'primary saveForm', '', 'book-single', 'link', '', ''), | ||
(NULL, 'Edit Book', 'fas fa-edit', 'Edit Book', '/book/edit/##ID##', 'primary', '', 'book-view', 'link', '', ''), | ||
(NULL, 'Add Book', 'fas fa-plus', 'Add Book', '/book/add', 'primary', '', 'book-index', 'link', '', ''); | ||
|
||
-- | ||
-- Fields | ||
-- | ||
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 | ||
(NULL, 'text', 'Name', 'label', 'book-base', 'book-single', 'col-md-3', '/book/view/##ID##', '', 0, 1, 0, '', '', ''); | ||
|
||
-- | ||
-- Default Widgets | ||
-- | ||
INSERT INTO `core_widget` (`Widget_ID`, `widget_name`, `label`, `permission`) VALUES | ||
(NULL, 'book_dailystats', 'Book - Daily Stats', 'index-Book\\Controller\\BookController'); | ||
|
||
COMMIT; |
Oops, something went wrong.