-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Historic Petition Viewer initial commit
- Loading branch information
Showing
17 changed files
with
1,061 additions
and
4 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
93 changes: 93 additions & 0 deletions
93
app/plugins/HistoricPetitionViewer/HistoricPetitionViewerPlugin.php
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,93 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| namespace HistoricPetitionViewer; | ||
|
|
||
| use Cake\Console\CommandCollection; | ||
| use Cake\Core\BasePlugin; | ||
| use Cake\Core\ContainerInterface; | ||
| use Cake\Core\PluginApplicationInterface; | ||
| use Cake\Http\MiddlewareQueue; | ||
| use Cake\Routing\RouteBuilder; | ||
|
|
||
| /** | ||
| * Plugin for CoreEnroller | ||
| */ | ||
| class HistoricPetitionViewerPlugin extends BasePlugin | ||
| { | ||
| /** | ||
| * Load all the plugin configuration and bootstrap logic. | ||
| * | ||
| * The host application is provided as an argument. This allows you to load | ||
| * additional plugin dependencies, or attach events. | ||
| * | ||
| * @param \Cake\Core\PluginApplicationInterface $app The host application | ||
| * @return void | ||
| */ | ||
| public function bootstrap(PluginApplicationInterface $app): void | ||
| { | ||
| } | ||
|
|
||
| /** | ||
| * Add routes for the plugin. | ||
| * | ||
| * If your plugin has many routes and you would like to isolate them into a separate file, | ||
| * you can create `$plugin/config/routes.php` and delete this method. | ||
| * | ||
| * @param \Cake\Routing\RouteBuilder $routes The route builder to update. | ||
| * @return void | ||
| */ | ||
| public function routes(RouteBuilder $routes): void | ||
| { | ||
| $routes->plugin( | ||
| 'HistoryPetitionViewer', | ||
| ['path' => '/historic-petition-viewer'], | ||
| function (RouteBuilder $builder) { | ||
| // Add custom routes here | ||
|
|
||
| $builder->fallbacks(); | ||
| } | ||
| ); | ||
| parent::routes($routes); | ||
| } | ||
|
|
||
| /** | ||
| * Add middleware for the plugin. | ||
| * | ||
| * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to update. | ||
| * @return \Cake\Http\MiddlewareQueue | ||
| */ | ||
| public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue | ||
| { | ||
| // Add your middlewares here | ||
|
|
||
| return $middlewareQueue; | ||
| } | ||
|
|
||
| /** | ||
| * Add commands for the plugin. | ||
| * | ||
| * @param \Cake\Console\CommandCollection $commands The command collection to update. | ||
| * @return \Cake\Console\CommandCollection | ||
| */ | ||
| public function console(CommandCollection $commands): CommandCollection | ||
| { | ||
| // Add your commands here | ||
|
|
||
| $commands = parent::console($commands); | ||
|
|
||
| return $commands; | ||
| } | ||
|
|
||
| /** | ||
| * Register application container services. | ||
| * | ||
| * @param \Cake\Core\ContainerInterface $container The Container to update. | ||
| * @return void | ||
| * @link https://book.cakephp.org/4/en/development/dependency-injection.html#dependency-injection | ||
| */ | ||
| public function services(ContainerInterface $container): void | ||
| { | ||
| // Add your services here | ||
| } | ||
| } |
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,77 @@ | ||
| { | ||
| "name": "Historic Petition Viewer", | ||
| "version": "1.0.0", | ||
| "description": "", | ||
| "types": {}, | ||
| "schema": { | ||
| "tables": { | ||
| "historic_petition_attributes": { | ||
| "comment": "Transmogrified from cm_co_petition_attributes", | ||
| "columns": { | ||
| "id": { "type": "integer", "autoincrement": true, "primarykey": true }, | ||
| "petition_id": { "type": "integer", "foreignkey": { "table": "petitions", "column": "id" } }, | ||
| "attribute": { "type": "string", "size": 128 }, | ||
| "value": { "type": "text" }, | ||
| "created": { "type": "datetime" }, | ||
| "modified": { "type": "datetime" }, | ||
| "historic_petition_attribute_id": { "type": "integer", "foreignkey": { "table": "historic_petition_attributes", "column": "id" } }, | ||
| "revision": { "type": "integer" }, | ||
| "deleted": { "type": "boolean" }, | ||
| "actor_identifier": { "type": "string", "size": 256 } | ||
| }, | ||
| "indexes": { | ||
| "historic_petition_attributes_i1": { "columns": [ "petition_id" ] }, | ||
| "historic_petition_attributes_i2": { "columns": [ "attribute" ] }, | ||
| "historic_petition_attributes_i3": { "columns": [ "historic_petition_attribute_id" ] } | ||
| } | ||
| }, | ||
| "historic_petition_metadata": { | ||
| "comment": "Transmogrified from cm_co_petitions fields that no longer map to petitions", | ||
| "columns": { | ||
| "id": { "type": "integer", "autoincrement": true, "primarykey": true }, | ||
| "petition_id": { "type": "integer", "foreignkey": { "table": "petitions", "column": "id" } }, | ||
|
|
||
| "enrollee_org_identity_id": { "type": "integer" }, | ||
| "archived_org_identity_id": { "type": "integer" }, | ||
| "enrollee_person_role_id": { "type": "integer" }, | ||
| "sponsor_person_id": { "type": "integer" }, | ||
| "approver_person_id": { "type": "integer" }, | ||
| "co_invite_id": { "type": "integer" }, | ||
| "vetting_request_id": { "type": "integer" }, | ||
|
|
||
| "token": { "type": "string", "size": 256 }, | ||
| "enrollee_token": { "type": "string", "size": 48 }, | ||
| "petitioner_token": { "type": "string", "size": 48 }, | ||
| "return_url": { "type": "string", "size": 512 }, | ||
| "approver_comment": { "type": "string", "size": 256 }, | ||
|
|
||
| "created": { "type": "datetime" }, | ||
| "modified": { "type": "datetime" }, | ||
| "historic_petition_metadata_id": { "type": "integer", "foreignkey": { "table": "historic_petition_metadata", "column": "id" } }, | ||
| "revision": { "type": "integer" }, | ||
| "deleted": { "type": "boolean" }, | ||
| "actor_identifier": { "type": "string", "size": 256 } | ||
| }, | ||
| "indexes": { | ||
| "historic_petition_metadata_i1": { "columns": [ "petition_id" ] }, | ||
| "historic_petition_metadata_i2": { "columns": [ "historic_petition_metadata_id" ] } | ||
| } | ||
| }, | ||
| "historic_petition_step_links": { | ||
| "comment": "Associates a Petition’s historic data to a specific Enrollment Flow Step for read-only viewing", | ||
| "columns": { | ||
| "id": { "type": "integer", "autoincrement": true, "primarykey": true }, | ||
| "petition_id": { "type": "integer", "foreignkey": { "table": "petitions", "column": "id" } }, | ||
| "enrollment_flow_step_id": { "type": "integer", "foreignkey": { "table": "enrollment_flow_steps", "column": "id" } }, | ||
| "created": { "type": "datetime" }, | ||
| "modified": { "type": "datetime" } | ||
| }, | ||
| "indexes": { | ||
| "historic_petition_step_links_i1": { "columns": [ "petition_id" ] }, | ||
| "historic_petition_step_links_i2": { "columns": [ "enrollment_flow_step_id" ] }, | ||
| "historic_petition_step_links_u1": { "columns": [ "petition_id", "enrollment_flow_step_id" ] } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
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,44 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * Historic Petition View plugin specific routes. | ||
| * | ||
| * Portions licensed to the University Corporation for Advanced Internet | ||
| * Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| * See the NOTICE file distributed with this work for additional information | ||
| * regarding copyright ownership. | ||
| * | ||
| * UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at: | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * @link https://www.internet2.edu/comanage COmanage Project | ||
| * @package registry-plugins | ||
| * @since COmanage Registry v5.0.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| use Cake\Routing\Route\DashedRoute; | ||
|
|
||
| Router::plugin( | ||
| 'HistoricPetition', | ||
| ['path' => '/historic-petition'], | ||
| function (RouteBuilder $routes) { | ||
| $routes->connect( | ||
| '/', | ||
| ['controller' => 'HistoricPetitionViews', | ||
| 'action' => 'index'] | ||
| ); | ||
| $routes->fallbacks(); | ||
| } | ||
| ); |
10 changes: 10 additions & 0 deletions
10
app/plugins/HistoricPetitionViewer/src/Controller/AppController.php
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,10 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| namespace HistoricPetitionViewer\Controller; | ||
|
|
||
| use App\Controller\AppController as BaseController; | ||
|
|
||
| class AppController extends BaseController | ||
| { | ||
| } |
98 changes: 98 additions & 0 deletions
98
app/plugins/HistoricPetitionViewer/src/HistoricPetitionViewerPlugin.php
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,98 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| namespace HistoricPetitionViewer; | ||
|
|
||
| use Cake\Console\CommandCollection; | ||
| use Cake\Core\BasePlugin; | ||
| use Cake\Core\ContainerInterface; | ||
| use Cake\Core\PluginApplicationInterface; | ||
| use Cake\Http\MiddlewareQueue; | ||
| use Cake\Routing\RouteBuilder; | ||
|
|
||
| /** | ||
| * Plugin for HistoricPetitionViewer | ||
| */ | ||
| class HistoricPetitionViewerPlugin extends BasePlugin | ||
| { | ||
| /** | ||
| * Load all the plugin configuration and bootstrap logic. | ||
| * | ||
| * The host application is provided as an argument. This allows you to load | ||
| * additional plugin dependencies, or attach events. | ||
| * | ||
| * @param \Cake\Core\PluginApplicationInterface $app The host application | ||
| * @return void | ||
| */ | ||
| public function bootstrap(PluginApplicationInterface $app): void | ||
| { | ||
| // remove this method hook if you don't need it | ||
| } | ||
|
|
||
| /** | ||
| * Add routes for the plugin. | ||
| * | ||
| * If your plugin has many routes and you would like to isolate them into a separate file, | ||
| * you can create `$plugin/config/routes.php` and delete this method. | ||
| * | ||
| * @param \Cake\Routing\RouteBuilder $routes The route builder to update. | ||
| * @return void | ||
| */ | ||
| public function routes(RouteBuilder $routes): void | ||
| { | ||
| // remove this method hook if you don't need it | ||
| $routes->plugin( | ||
| 'HistoricPetitionViewer', | ||
| ['path' => '/historic-petition-viewer'], | ||
| function (RouteBuilder $builder) { | ||
| // Add custom routes here | ||
|
|
||
| $builder->fallbacks(); | ||
| } | ||
| ); | ||
| parent::routes($routes); | ||
| } | ||
|
|
||
| /** | ||
| * Add middleware for the plugin. | ||
| * | ||
| * @param \Cake\Http\MiddlewareQueue $middlewareQueue The middleware queue to update. | ||
| * @return \Cake\Http\MiddlewareQueue | ||
| */ | ||
| public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue | ||
| { | ||
| // Add your middlewares here | ||
| // remove this method hook if you don't need it | ||
|
|
||
| return $middlewareQueue; | ||
| } | ||
|
|
||
| /** | ||
| * Add commands for the plugin. | ||
| * | ||
| * @param \Cake\Console\CommandCollection $commands The command collection to update. | ||
| * @return \Cake\Console\CommandCollection | ||
| */ | ||
| public function console(CommandCollection $commands): CommandCollection | ||
| { | ||
| // Add your commands here | ||
| // remove this method hook if you don't need it | ||
|
|
||
| $commands = parent::console($commands); | ||
|
|
||
| return $commands; | ||
| } | ||
|
|
||
| /** | ||
| * Register application container services. | ||
| * | ||
| * @param \Cake\Core\ContainerInterface $container The Container to update. | ||
| * @return void | ||
| * @link https://book.cakephp.org/5/en/development/dependency-injection.html#dependency-injection | ||
| */ | ||
| public function services(ContainerInterface $container): void | ||
| { | ||
| // Add your services here | ||
| // remove this method hook if you don't need it | ||
| } | ||
| } |
43 changes: 43 additions & 0 deletions
43
app/plugins/HistoricPetitionViewer/src/Model/Entity/HistoricPetitionAttribute.php
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,43 @@ | ||
| <?php | ||
| /** | ||
| * Historic Petition Attribute plugin Entity. | ||
| * | ||
| * Portions licensed to the University Corporation for Advanced Internet | ||
| * Development, Inc. ("UCAID") under one or more contributor license agreements. | ||
| * See the NOTICE file distributed with this work for additional information | ||
| * regarding copyright ownership. | ||
| * | ||
| * UCAID licenses this file to you under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with the | ||
| * License. You may obtain a copy of the License at: | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| * | ||
| * @link https://www.internet2.edu/comanage COmanage Project | ||
| * @package registry-plugins | ||
| * @since COmanage Registry v5.2.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace HistoricPetitionViewer\Model\Entity; | ||
|
|
||
| use Cake\ORM\Entity; | ||
|
|
||
| class HistoricPetitionAttribute extends Entity | ||
| { | ||
| use \App\Lib\Traits\EntityMetaTrait; | ||
|
|
||
| protected array $_accessible = [ | ||
| '*' => true, | ||
| 'id' => false, | ||
| 'slug' => false, | ||
| ]; | ||
| } |
Oops, something went wrong.