$this->loadComponent('Flash');
- $this->loadComponent('Auth', [
- 'authenticate' => [
- 'Form' => [
- 'fields' => [
- 'username' => 'username',
- 'password' => 'password'
- ]
- ]
- ],
- 'loginAction' => [
- 'controller' => 'Users',
- 'action' => 'login'
- ],
- 'loginRedirect' => [
- 'controller' => 'Softwares',
- 'action' => 'index'
- ],
- 'logoutRedirect' => [
- 'controller' => 'Pages',
- 'action' => 'display',
- 'home'
- ]
- ]);
-
- //Autorise l'action display pour que notre controller de pages
- // continue de fonctionner.
- $this->Auth->allow(['display']);
+// $this->loadComponent('Auth', [
+// 'authenticate' => [
+// 'Form' => [
+// 'fields' => [
+// 'username' => 'username',
+// 'password' => 'password'
+// ]
+// ]
+// ],
+// 'loginAction' => [
+// 'controller' => 'Users',
+// 'action' => 'login'
+// ],
+// 'loginRedirect' => [
+// 'controller' => 'Softwares',
+// 'action' => 'index'
+// ],
+// 'logoutRedirect' => [
+// 'controller' => 'Pages',
+// 'action' => 'display',
+// 'home'
+// ]
+// ]);
+//
+// //Autorise l'action display pour que notre controller de pages
+// // continue de fonctionner.
+// $this->Auth->allow(['display']);
}
--- /dev/null
+<?php
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * LicenceTypes Controller
+ *
+ * @property \App\Model\Table\LicenceTypesTable $LicenceTypes
+ */
+class LicenceTypesController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->set('licenceTypes', $this->paginate($this->LicenceTypes));
+ $this->set('_serialize', ['licenceTypes']);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Licence Type id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $licenceType = $this->LicenceTypes->get($id, [
+ 'contain' => []
+ ]);
+ $this->set('licenceType', $licenceType);
+ $this->set('_serialize', ['licenceType']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $licenceType = $this->LicenceTypes->newEntity();
+ if ($this->request->is('post')) {
+ $licenceType = $this->LicenceTypes->patchEntity($licenceType, $this->request->data);
+ if ($this->LicenceTypes->save($licenceType)) {
+ $this->Flash->success(__('The licence type has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The licence type could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('licenceType'));
+ $this->set('_serialize', ['licenceType']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Licence Type id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $licenceType = $this->LicenceTypes->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $licenceType = $this->LicenceTypes->patchEntity($licenceType, $this->request->data);
+ if ($this->LicenceTypes->save($licenceType)) {
+ $this->Flash->success(__('The licence type has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The licence type could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('licenceType'));
+ $this->set('_serialize', ['licenceType']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Licence Type id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $licenceType = $this->LicenceTypes->get($id);
+ if ($this->LicenceTypes->delete($licenceType)) {
+ $this->Flash->success(__('The licence type has been deleted.'));
+ } else {
+ $this->Flash->error(__('The licence type could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
public function view($id = null)
{
$relationshipType = $this->RelationshipTypes->get($id, [
- 'contain' => ['SoftwaresRelationships', 'UsersRelationships']
+ 'contain' => ['Relationships']
]);
$this->set('relationshipType', $relationshipType);
$this->set('_serialize', ['relationshipType']);
--- /dev/null
+<?php
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * Relationships Controller
+ *
+ * @property \App\Model\Table\RelationshipsTable $Relationships
+ */
+class RelationshipsController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['RelationshipTypes']
+ ];
+ $this->set('relationships', $this->paginate($this->Relationships));
+ $this->set('_serialize', ['relationships']);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Relationship id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $relationship = $this->Relationships->get($id, [
+ 'contain' => ['RelationshipTypes', 'Softwares', 'Users']
+ ]);
+ $this->set('relationship', $relationship);
+ $this->set('_serialize', ['relationship']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $relationship = $this->Relationships->newEntity();
+ if ($this->request->is('post')) {
+ $relationship = $this->Relationships->patchEntity($relationship, $this->request->data);
+ if ($this->Relationships->save($relationship)) {
+ $this->Flash->success(__('The relationship has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationship could not be saved. Please, try again.'));
+ }
+ }
+ $relationshipTypes = $this->Relationships->RelationshipTypes->find('list', ['limit' => 200]);
+ $softwares = $this->Relationships->Softwares->find('list', ['limit' => 200]);
+ $users = $this->Relationships->Users->find('list', ['limit' => 200]);
+ $this->set(compact('relationship', 'relationshipTypes', 'softwares', 'users'));
+ $this->set('_serialize', ['relationship']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Relationship id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $relationship = $this->Relationships->get($id, [
+ 'contain' => ['Softwares', 'Users']
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $relationship = $this->Relationships->patchEntity($relationship, $this->request->data);
+ if ($this->Relationships->save($relationship)) {
+ $this->Flash->success(__('The relationship has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationship could not be saved. Please, try again.'));
+ }
+ }
+ $relationshipTypes = $this->Relationships->RelationshipTypes->find('list', ['limit' => 200]);
+ $softwares = $this->Relationships->Softwares->find('list', ['limit' => 200]);
+ $users = $this->Relationships->Users->find('list', ['limit' => 200]);
+ $this->set(compact('relationship', 'relationshipTypes', 'softwares', 'users'));
+ $this->set('_serialize', ['relationship']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Relationship id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $relationship = $this->Relationships->get($id);
+ if ($this->Relationships->delete($relationship)) {
+ $this->Flash->success(__('The relationship has been deleted.'));
+ } else {
+ $this->Flash->error(__('The relationship could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
--- /dev/null
+<?php
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * RelationshipsSoftwares Controller
+ *
+ * @property \App\Model\Table\RelationshipsSoftwaresTable $RelationshipsSoftwares
+ */
+class RelationshipsSoftwaresController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->set('relationshipsSoftwares', $this->paginate($this->RelationshipsSoftwares));
+ $this->set('_serialize', ['relationshipsSoftwares']);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Relationships Software id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $relationshipsSoftware = $this->RelationshipsSoftwares->get($id, [
+ 'contain' => []
+ ]);
+ $this->set('relationshipsSoftware', $relationshipsSoftware);
+ $this->set('_serialize', ['relationshipsSoftware']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $relationshipsSoftware = $this->RelationshipsSoftwares->newEntity();
+ if ($this->request->is('post')) {
+ $relationshipsSoftware = $this->RelationshipsSoftwares->patchEntity($relationshipsSoftware, $this->request->data);
+ if ($this->RelationshipsSoftwares->save($relationshipsSoftware)) {
+ $this->Flash->success(__('The relationships software has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationships software could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('relationshipsSoftware'));
+ $this->set('_serialize', ['relationshipsSoftware']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Relationships Software id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $relationshipsSoftware = $this->RelationshipsSoftwares->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $relationshipsSoftware = $this->RelationshipsSoftwares->patchEntity($relationshipsSoftware, $this->request->data);
+ if ($this->RelationshipsSoftwares->save($relationshipsSoftware)) {
+ $this->Flash->success(__('The relationships software has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationships software could not be saved. Please, try again.'));
+ }
+ }
+ $this->set(compact('relationshipsSoftware'));
+ $this->set('_serialize', ['relationshipsSoftware']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Relationships Software id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $relationshipsSoftware = $this->RelationshipsSoftwares->get($id);
+ if ($this->RelationshipsSoftwares->delete($relationshipsSoftware)) {
+ $this->Flash->success(__('The relationships software has been deleted.'));
+ } else {
+ $this->Flash->error(__('The relationships software could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
--- /dev/null
+<?php
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * RelationshipsSoftwaresUsers Controller
+ *
+ * @property \App\Model\Table\RelationshipsSoftwaresUsersTable $RelationshipsSoftwaresUsers
+ */
+class RelationshipsSoftwaresUsersController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Softwares', 'Users', 'Relationships']
+ ];
+ $this->set('relationshipsSoftwaresUsers', $this->paginate($this->RelationshipsSoftwaresUsers));
+ $this->set('_serialize', ['relationshipsSoftwaresUsers']);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Relationships Softwares User id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->get($id, [
+ 'contain' => ['Softwares', 'Users', 'Relationships']
+ ]);
+ $this->set('relationshipsSoftwaresUser', $relationshipsSoftwaresUser);
+ $this->set('_serialize', ['relationshipsSoftwaresUser']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->newEntity();
+ if ($this->request->is('post')) {
+ $relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->patchEntity($relationshipsSoftwaresUser, $this->request->data);
+ if ($this->RelationshipsSoftwaresUsers->save($relationshipsSoftwaresUser)) {
+ $this->Flash->success(__('The relationships softwares user has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationships softwares user could not be saved. Please, try again.'));
+ }
+ }
+ $softwares = $this->RelationshipsSoftwaresUsers->Softwares->find('list', ['limit' => 200]);
+ $users = $this->RelationshipsSoftwaresUsers->Users->find('list', ['limit' => 200]);
+ $relationships = $this->RelationshipsSoftwaresUsers->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('relationshipsSoftwaresUser', 'softwares', 'users', 'relationships'));
+ $this->set('_serialize', ['relationshipsSoftwaresUser']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Relationships Softwares User id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->patchEntity($relationshipsSoftwaresUser, $this->request->data);
+ if ($this->RelationshipsSoftwaresUsers->save($relationshipsSoftwaresUser)) {
+ $this->Flash->success(__('The relationships softwares user has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationships softwares user could not be saved. Please, try again.'));
+ }
+ }
+ $softwares = $this->RelationshipsSoftwaresUsers->Softwares->find('list', ['limit' => 200]);
+ $users = $this->RelationshipsSoftwaresUsers->Users->find('list', ['limit' => 200]);
+ $relationships = $this->RelationshipsSoftwaresUsers->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('relationshipsSoftwaresUser', 'softwares', 'users', 'relationships'));
+ $this->set('_serialize', ['relationshipsSoftwaresUser']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Relationships Softwares User id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $relationshipsSoftwaresUser = $this->RelationshipsSoftwaresUsers->get($id);
+ if ($this->RelationshipsSoftwaresUsers->delete($relationshipsSoftwaresUser)) {
+ $this->Flash->success(__('The relationships softwares user has been deleted.'));
+ } else {
+ $this->Flash->error(__('The relationships softwares user could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
--- /dev/null
+<?php
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * RelationshipsUsers Controller
+ *
+ * @property \App\Model\Table\RelationshipsUsersTable $RelationshipsUsers
+ */
+class RelationshipsUsersController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Users', 'Relationships']
+ ];
+ $this->set('relationshipsUsers', $this->paginate($this->RelationshipsUsers));
+ $this->set('_serialize', ['relationshipsUsers']);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Relationships User id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $relationshipsUser = $this->RelationshipsUsers->get($id, [
+ 'contain' => ['Users', 'Relationships']
+ ]);
+ $this->set('relationshipsUser', $relationshipsUser);
+ $this->set('_serialize', ['relationshipsUser']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $relationshipsUser = $this->RelationshipsUsers->newEntity();
+ if ($this->request->is('post')) {
+ $relationshipsUser = $this->RelationshipsUsers->patchEntity($relationshipsUser, $this->request->data);
+ if ($this->RelationshipsUsers->save($relationshipsUser)) {
+ $this->Flash->success(__('The relationships user has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationships user could not be saved. Please, try again.'));
+ }
+ }
+ $users = $this->RelationshipsUsers->Users->find('list', ['limit' => 200]);
+ $relationships = $this->RelationshipsUsers->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('relationshipsUser', 'users', 'relationships'));
+ $this->set('_serialize', ['relationshipsUser']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Relationships User id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $relationshipsUser = $this->RelationshipsUsers->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $relationshipsUser = $this->RelationshipsUsers->patchEntity($relationshipsUser, $this->request->data);
+ if ($this->RelationshipsUsers->save($relationshipsUser)) {
+ $this->Flash->success(__('The relationships user has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The relationships user could not be saved. Please, try again.'));
+ }
+ }
+ $users = $this->RelationshipsUsers->Users->find('list', ['limit' => 200]);
+ $relationships = $this->RelationshipsUsers->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('relationshipsUser', 'users', 'relationships'));
+ $this->set('_serialize', ['relationshipsUser']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Relationships User id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $relationshipsUser = $this->RelationshipsUsers->get($id);
+ if ($this->RelationshipsUsers->delete($relationshipsUser)) {
+ $this->Flash->success(__('The relationships user has been deleted.'));
+ } else {
+ $this->Flash->error(__('The relationships user could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
if ($this->Softwares->save($software)) {
$this->Flash->success(__('The software has been saved.'));
- $screenshot_ = $this->Softwares->Screenshots->get($software['screenshots'][0]['id'], [
- 'contain' => []
- ]);
+
// Upload the screenshot
- $screenshotsTable = TableRegistry::get('Screenshots');
- $screenshot = $this->Softwares->Screenshots->patchEntity($screenshot_,$this->request->data['screenshots']);
- $screenshotsTable->save($screenshot);
+ if ( !empty( $this->request->data['screenshots'] ) ){
+ $screenshot_ = $this->Softwares->Screenshots->get($software['screenshots'][0]['id'], [
+ 'contain' => []
+ ]);
+ $screenshotsTable = TableRegistry::get('Screenshots');
+ $screenshot = $this->Softwares->Screenshots->patchEntity($screenshot_,$this->request->data['screenshots']);
+ $screenshotsTable->save($screenshot);
+ }
+
return $this->redirect(['action' => 'index']);
} else {
*/
public function add()
{
+
+
$softwaresRelationship = $this->SoftwaresRelationships->newEntity();
+
+
if ($this->request->is('post')) {
- $softwaresRelationship = $this->SoftwaresRelationships->patchEntity($softwaresRelationship, $this->request->data);
+
+
+// $softwaresRelationship->software_id = $this->request->data['softwares'];
+// $softwaresRelationship->recipient_id = $this->request->data['recipients'];
+// $softwaresRelationship->relationship_type_id = $this->request->data['relationship_types'];
+
+ $softwaresRelationship = $this->SoftwaresRelationships->patchEntity($softwaresRelationship, $this->request->data);
+
if ($this->SoftwaresRelationships->save($softwaresRelationship)) {
$this->Flash->success(__('The softwares relationship has been saved.'));
- return $this->redirect(['action' => 'index']);
+ //return $this->redirect(['action' => 'index']);
} else {
$this->Flash->error(__('The softwares relationship could not be saved. Please, try again.'));
}
}
$softwares = $this->SoftwaresRelationships->Softwares->find('list', ['limit' => 200]);
- $recipients = $this->SoftwaresRelationships->Recipients->find('list', ['limit' => 200]);
+ $recipients = $this->SoftwaresRelationships->Softwares->find('list', ['limit' => 200]);
$relationshipTypes = $this->SoftwaresRelationships->RelationshipTypes->find('list', ['limit' => 200]);
$this->set(compact('softwaresRelationship', 'softwares', 'recipients', 'relationshipTypes'));
$this->set('_serialize', ['softwaresRelationship']);
namespace App\Controller;
use App\Controller\AppController;
-use Cake\Event\Event;
/**
* Users Controller
class UsersController extends AppController
{
- public function beforeFilter(Event $event)
- {
- parent::beforeFilter($event);
- $this->Auth->allow('add');
-
- }
-
-
/**
* Index method
*
public function view($id = null)
{
$user = $this->Users->get($id, [
- 'contain' => ['UserTypes']
+ //'contain' => ['UserTypes', 'RelationshipsSoftwares', 'Relationships', 'Reviews']
+ 'contain'=>['UserTypes','Reviews']
]);
$this->set('user', $user);
$this->set('_serialize', ['user']);
}
}
$userTypes = $this->Users->UserTypes->find('list', ['limit' => 200]);
- $this->set(compact('user', 'userTypes'));
+// $relationshipsSoftwares = $this->Users->RelationshipsSoftwares->find('list', ['limit' => 200]);
+// $relationships = $this->Users->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('user', 'userTypes'/*, 'relationshipsSoftwares', 'relationships'*/));
$this->set('_serialize', ['user']);
}
public function edit($id = null)
{
$user = $this->Users->get($id, [
- 'contain' => []
+ //'contain' => ['RelationshipsSoftwares', 'Relationships']
+ 'contain'=>[]
]);
- // If the auth user id is equal to the the id of the current user page.
if ($this->request->is(['patch', 'post', 'put'])) {
$user = $this->Users->patchEntity($user, $this->request->data);
if ($this->Users->save($user)) {
}
}
$userTypes = $this->Users->UserTypes->find('list', ['limit' => 200]);
- $this->set(compact('user', 'userTypes'));
+// $relationshipsSoftwares = $this->Users->RelationshipsSoftwares->find('list', ['limit' => 200]);
+// $relationships = $this->Users->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('user', 'userTypes'/*, 'relationshipsSoftwares', 'relationships'*/));
$this->set('_serialize', ['user']);
-
}
/**
return $this->redirect(['action' => 'index']);
}
-
public function login()
{
if ($this->request->is('post')) {
return parent::isAuthorized($user);
}
-
}
+++ /dev/null
-<?php
-namespace App\Controller;
-
-use App\Controller\AppController;
-
-/**
- * UsersRelationships Controller
- *
- * @property \App\Model\Table\UsersRelationshipsTable $UsersRelationships
- */
-class UsersRelationshipsController extends AppController
-{
-
- /**
- * Index method
- *
- * @return void
- */
- public function index()
- {
- $this->paginate = [
- 'contain' => ['Users', 'Recipients', 'RelationshipTypes']
- ];
- $this->set('usersRelationships', $this->paginate($this->UsersRelationships));
- $this->set('_serialize', ['usersRelationships']);
- }
-
- /**
- * View method
- *
- * @param string|null $id Users Relationship id.
- * @return void
- * @throws \Cake\Network\Exception\NotFoundException When record not found.
- */
- public function view($id = null)
- {
- $usersRelationship = $this->UsersRelationships->get($id, [
- 'contain' => ['Users', 'Recipients', 'RelationshipTypes']
- ]);
- $this->set('usersRelationship', $usersRelationship);
- $this->set('_serialize', ['usersRelationship']);
- }
-
- /**
- * Add method
- *
- * @return void Redirects on successful add, renders view otherwise.
- */
- public function add()
- {
- $usersRelationship = $this->UsersRelationships->newEntity();
- if ($this->request->is('post')) {
- $usersRelationship = $this->UsersRelationships->patchEntity($usersRelationship, $this->request->data);
- if ($this->UsersRelationships->save($usersRelationship)) {
- $this->Flash->success(__('The users relationship has been saved.'));
- return $this->redirect(['action' => 'index']);
- } else {
- $this->Flash->error(__('The users relationship could not be saved. Please, try again.'));
- }
- }
- $users = $this->UsersRelationships->Users->find('list', ['limit' => 200]);
- $recipients = $this->UsersRelationships->Recipients->find('list', ['limit' => 200]);
- $relationshipTypes = $this->UsersRelationships->RelationshipTypes->find('list', ['limit' => 200]);
- $this->set(compact('usersRelationship', 'users', 'recipients', 'relationshipTypes'));
- $this->set('_serialize', ['usersRelationship']);
- }
-
- /**
- * Edit method
- *
- * @param string|null $id Users Relationship id.
- * @return void Redirects on successful edit, renders view otherwise.
- * @throws \Cake\Network\Exception\NotFoundException When record not found.
- */
- public function edit($id = null)
- {
- $usersRelationship = $this->UsersRelationships->get($id, [
- 'contain' => []
- ]);
- if ($this->request->is(['patch', 'post', 'put'])) {
- $usersRelationship = $this->UsersRelationships->patchEntity($usersRelationship, $this->request->data);
- if ($this->UsersRelationships->save($usersRelationship)) {
- $this->Flash->success(__('The users relationship has been saved.'));
- return $this->redirect(['action' => 'index']);
- } else {
- $this->Flash->error(__('The users relationship could not be saved. Please, try again.'));
- }
- }
- $users = $this->UsersRelationships->Users->find('list', ['limit' => 200]);
- $recipients = $this->UsersRelationships->Recipients->find('list', ['limit' => 200]);
- $relationshipTypes = $this->UsersRelationships->RelationshipTypes->find('list', ['limit' => 200]);
- $this->set(compact('usersRelationship', 'users', 'recipients', 'relationshipTypes'));
- $this->set('_serialize', ['usersRelationship']);
- }
-
- /**
- * Delete method
- *
- * @param string|null $id Users Relationship id.
- * @return \Cake\Network\Response|null Redirects to index.
- * @throws \Cake\Network\Exception\NotFoundException When record not found.
- */
- public function delete($id = null)
- {
- $this->request->allowMethod(['post', 'delete']);
- $usersRelationship = $this->UsersRelationships->get($id);
- if ($this->UsersRelationships->delete($usersRelationship)) {
- $this->Flash->success(__('The users relationship has been deleted.'));
- } else {
- $this->Flash->error(__('The users relationship could not be deleted. Please, try again.'));
- }
- return $this->redirect(['action' => 'index']);
- }
-}
--- /dev/null
+<?php
+namespace App\Controller;
+
+use App\Controller\AppController;
+
+/**
+ * UsersRelationshipsSoftwares Controller
+ *
+ * @property \App\Model\Table\UsersRelationshipsSoftwaresTable $UsersRelationshipsSoftwares
+ */
+class UsersRelationshipsSoftwaresController extends AppController
+{
+
+ /**
+ * Index method
+ *
+ * @return void
+ */
+ public function index()
+ {
+ $this->paginate = [
+ 'contain' => ['Softwares', 'Users', 'Relationships']
+ ];
+ $this->set('usersRelationshipsSoftwares', $this->paginate($this->UsersRelationshipsSoftwares));
+ $this->set('_serialize', ['usersRelationshipsSoftwares']);
+ }
+
+ /**
+ * View method
+ *
+ * @param string|null $id Users Relationships Software id.
+ * @return void
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function view($id = null)
+ {
+ $usersRelationshipsSoftware = $this->UsersRelationshipsSoftwares->get($id, [
+ 'contain' => ['Softwares', 'Users', 'Relationships']
+ ]);
+ $this->set('usersRelationshipsSoftware', $usersRelationshipsSoftware);
+ $this->set('_serialize', ['usersRelationshipsSoftware']);
+ }
+
+ /**
+ * Add method
+ *
+ * @return void Redirects on successful add, renders view otherwise.
+ */
+ public function add()
+ {
+ $usersRelationshipsSoftware = $this->UsersRelationshipsSoftwares->newEntity();
+ if ($this->request->is('post')) {
+ $usersRelationshipsSoftware = $this->UsersRelationshipsSoftwares->patchEntity($usersRelationshipsSoftware, $this->request->data);
+ if ($this->UsersRelationshipsSoftwares->save($usersRelationshipsSoftware)) {
+ $this->Flash->success(__('The users relationships software has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The users relationships software could not be saved. Please, try again.'));
+ }
+ }
+ $softwares = $this->UsersRelationshipsSoftwares->Softwares->find('list', ['limit' => 200]);
+ $users = $this->UsersRelationshipsSoftwares->Users->find('list', ['limit' => 200]);
+ $relationships = $this->UsersRelationshipsSoftwares->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('usersRelationshipsSoftware', 'softwares', 'users', 'relationships'));
+ $this->set('_serialize', ['usersRelationshipsSoftware']);
+ }
+
+ /**
+ * Edit method
+ *
+ * @param string|null $id Users Relationships Software id.
+ * @return void Redirects on successful edit, renders view otherwise.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function edit($id = null)
+ {
+ $usersRelationshipsSoftware = $this->UsersRelationshipsSoftwares->get($id, [
+ 'contain' => []
+ ]);
+ if ($this->request->is(['patch', 'post', 'put'])) {
+ $usersRelationshipsSoftware = $this->UsersRelationshipsSoftwares->patchEntity($usersRelationshipsSoftware, $this->request->data);
+ if ($this->UsersRelationshipsSoftwares->save($usersRelationshipsSoftware)) {
+ $this->Flash->success(__('The users relationships software has been saved.'));
+ return $this->redirect(['action' => 'index']);
+ } else {
+ $this->Flash->error(__('The users relationships software could not be saved. Please, try again.'));
+ }
+ }
+ $softwares = $this->UsersRelationshipsSoftwares->Softwares->find('list', ['limit' => 200]);
+ $users = $this->UsersRelationshipsSoftwares->Users->find('list', ['limit' => 200]);
+ $relationships = $this->UsersRelationshipsSoftwares->Relationships->find('list', ['limit' => 200]);
+ $this->set(compact('usersRelationshipsSoftware', 'softwares', 'users', 'relationships'));
+ $this->set('_serialize', ['usersRelationshipsSoftware']);
+ }
+
+ /**
+ * Delete method
+ *
+ * @param string|null $id Users Relationships Software id.
+ * @return \Cake\Network\Response|null Redirects to index.
+ * @throws \Cake\Network\Exception\NotFoundException When record not found.
+ */
+ public function delete($id = null)
+ {
+ $this->request->allowMethod(['post', 'delete']);
+ $usersRelationshipsSoftware = $this->UsersRelationshipsSoftwares->get($id);
+ if ($this->UsersRelationshipsSoftwares->delete($usersRelationshipsSoftware)) {
+ $this->Flash->success(__('The users relationships software has been deleted.'));
+ } else {
+ $this->Flash->error(__('The users relationships software could not be deleted. Please, try again.'));
+ }
+ return $this->redirect(['action' => 'index']);
+ }
+}
--- /dev/null
+<?php
+namespace App\Model\Entity;
+
+use Cake\ORM\Entity;
+
+/**
+ * Relationship Entity.
+ *
+ * @property int $id
+ * @property string $name
+ * @property \Cake\I18n\Time $created
+ * @property \Cake\I18n\Time $modified
+ * @property string $cd
+ * @property int $relationship_type_id
+ * @property \App\Model\Entity\RelationshipType $relationship_type
+ * @property \App\Model\Entity\Software[] $softwares
+ * @property \App\Model\Entity\User[] $users
+ */
+class Relationship extends Entity
+{
+
+ /**
+ * Fields that can be mass assigned using newEntity() or patchEntity().
+ *
+ * Note that when '*' is set to true, this allows all unspecified fields to
+ * be mass assigned. For security purposes, it is advised to set '*' to false
+ * (or remove it), and explicitly make individual fields accessible as needed.
+ *
+ * @var array
+ */
+ protected $_accessible = [
+ '*' => true,
+ 'id' => false,
+ ];
+}
* @property \Cake\I18n\Time $created
* @property \Cake\I18n\Time $modified
* @property string $cd
- * @property \App\Model\Entity\SoftwaresRelationship[] $softwares_relationships
- * @property \App\Model\Entity\UsersRelationship[] $users_relationships
+ * @property \App\Model\Entity\Relationship[] $relationships
*/
class RelationshipType extends Entity
{
--- /dev/null
+<?php
+namespace App\Model\Entity;
+
+use Cake\ORM\Entity;
+
+/**
+ * RelationshipsSoftware Entity.
+ *
+ * @property int $id
+ * @property int $software_id
+ * @property int $relationship_id
+ * @property \App\Model\Entity\Relationship $relationship
+ * @property int $recipient_id
+ * @property \App\Model\Entity\Software $software
+ * @property \Cake\I18n\Time $created
+ * @property \Cake\I18n\Time $modified
+ * @property \App\Model\Entity\User[] $users
+ */
+class RelationshipsSoftware extends Entity
+{
+
+ /**
+ * Fields that can be mass assigned using newEntity() or patchEntity().
+ *
+ * Note that when '*' is set to true, this allows all unspecified fields to
+ * be mass assigned. For security purposes, it is advised to set '*' to false
+ * (or remove it), and explicitly make individual fields accessible as needed.
+ *
+ * @var array
+ */
+ protected $_accessible = [
+ '*' => true,
+ 'id' => false,
+ ];
+}
--- /dev/null
+<?php
+namespace App\Model\Entity;
+
+use Cake\ORM\Entity;
+
+/**
+ * RelationshipsSoftwaresUser Entity.
+ *
+ * @property int $id
+ * @property int $software_id
+ * @property \App\Model\Entity\Software $software
+ * @property int $user_id
+ * @property \App\Model\Entity\User $user
+ * @property int $relationship_id
+ * @property \App\Model\Entity\Relationship $relationship
+ * @property \Cake\I18n\Time $created
+ * @property \Cake\I18n\Time $modified
+ */
+class RelationshipsSoftwaresUser extends Entity
+{
+
+ /**
+ * Fields that can be mass assigned using newEntity() or patchEntity().
+ *
+ * Note that when '*' is set to true, this allows all unspecified fields to
+ * be mass assigned. For security purposes, it is advised to set '*' to false
+ * (or remove it), and explicitly make individual fields accessible as needed.
+ *
+ * @var array
+ */
+ protected $_accessible = [
+ '*' => true,
+ 'id' => false,
+ ];
+}
--- /dev/null
+<?php
+namespace App\Model\Entity;
+
+use Cake\ORM\Entity;
+
+/**
+ * RelationshipsUser Entity.
+ *
+ * @property int $id
+ * @property int $user_id
+ * @property int $recipient_id
+ * @property \App\Model\Entity\User $user
+ * @property int $relationship_id
+ * @property \App\Model\Entity\Relationship $relationship
+ * @property \Cake\I18n\Time $created
+ * @property \Cake\I18n\Time $modified
+ */
+class RelationshipsUser extends Entity
+{
+
+ /**
+ * Fields that can be mass assigned using newEntity() or patchEntity().
+ *
+ * Note that when '*' is set to true, this allows all unspecified fields to
+ * be mass assigned. For security purposes, it is advised to set '*' to false
+ * (or remove it), and explicitly make individual fields accessible as needed.
+ *
+ * @var array
+ */
+ protected $_accessible = [
+ '*' => true,
+ 'id' => false,
+ ];
+}
* @property \App\Model\Entity\License $license
* @property \Cake\I18n\Time $created
* @property \Cake\I18n\Time $modified
- * @property string $photo
* @property string $logo_directory
+ * @property string $photo
* @property \App\Model\Entity\Review[] $reviews
* @property \App\Model\Entity\Screenshot[] $screenshots
+ * @property \App\Model\Entity\Relationship[] $relationships
*/
class Software extends Entity
{
/**
* SoftwaresRelationship Entity.
*
+ * @property int $id
* @property int $software_id
- * @property \App\Model\Entity\Software $software
+ * @property int $relationship_id
+ * @property \App\Model\Entity\Relationship $relationship
* @property int $recipient_id
- * @property \App\Model\Entity\Recipient $recipient
- * @property int $relationship_type_id
- * @property \App\Model\Entity\RelationshipType $relationship_type
+ * @property \App\Model\Entity\Software $software
* @property \Cake\I18n\Time $created
* @property \Cake\I18n\Time $modified
*/
*/
protected $_accessible = [
'*' => true,
- 'software_id' => false,
- 'recipient_id' => false,
- 'relationship_type_id' => false,
+ 'id' => false,
];
}
namespace App\Model\Entity;
use Cake\ORM\Entity;
-use Cake\Auth\DefaultPasswordHasher;
+
/**
* User Entity.
*
* @property int $id
* @property string $username
* @property \Cake\I18n\Time $created
- * @property string $logo_url
+ * @property string $logo_directory
* @property string $url
* @property int $user_type_id
* @property \App\Model\Entity\UserType $user_type
* @property \Cake\I18n\Time $modified
* @property string $role
* @property string $password
+ * @property string $email
+ * @property $photo
*/
class User extends Entity
{
protected $_accessible = [
'*' => true,
'id' => false,
- 'user_type_id' => true,
];
-
-
- protected function _setPassword($value)
- {
- $hasher = new DefaultPasswordHasher();
- return $hasher->hash($value);
- }
}
/**
* UsersRelationship Entity.
*
+ * @property int $id
* @property int $user_id
* @property \App\Model\Entity\User $user
* @property int $recipient_id
* @property \App\Model\Entity\Recipient $recipient
- * @property int $relationship_type_id
- * @property \App\Model\Entity\RelationshipType $relationship_type
+ * @property int $relationship_id
* @property \Cake\I18n\Time $created
* @property \Cake\I18n\Time $modified
+ * @property \App\Model\Entity\RelationshipType $relationship_type
*/
class UsersRelationship extends Entity
{
--- /dev/null
+<?php
+namespace App\Model\Entity;
+
+use Cake\ORM\Entity;
+
+/**
+ * UsersRelationshipsSoftware Entity.
+ *
+ * @property int $id
+ * @property int $software_id
+ * @property \App\Model\Entity\Software $software
+ * @property int $user_id
+ * @property \App\Model\Entity\User $user
+ * @property int $relationship_id
+ * @property \App\Model\Entity\Relationship $relationship
+ * @property \Cake\I18n\Time $created
+ * @property \Cake\I18n\Time $modified
+ */
+class UsersRelationshipsSoftware extends Entity
+{
+
+ /**
+ * Fields that can be mass assigned using newEntity() or patchEntity().
+ *
+ * Note that when '*' is set to true, this allows all unspecified fields to
+ * be mass assigned. For security purposes, it is advised to set '*' to false
+ * (or remove it), and explicitly make individual fields accessible as needed.
+ *
+ * @var array
+ */
+ protected $_accessible = [
+ '*' => true,
+ 'id' => false,
+ ];
+}
/**
* RelationshipTypes Model
*
- * @property \Cake\ORM\Association\HasMany $SoftwaresRelationships
- * @property \Cake\ORM\Association\HasMany $UsersRelationships
+ * @property \Cake\ORM\Association\HasMany $Relationships
*/
class RelationshipTypesTable extends Table
{
$this->addBehavior('Timestamp');
- $this->hasMany('SoftwaresRelationships', [
- 'foreignKey' => 'relationship_type_id'
- ]);
- $this->hasMany('UsersRelationships', [
+ $this->hasMany('Relationships', [
'foreignKey' => 'relationship_type_id'
]);
}
->allowEmpty('id', 'create');
$validator
- ->requirePresence('name', 'create')
- ->notEmpty('name');
+ ->allowEmpty('name')
+ ->add('name', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
$validator
- ->allowEmpty('cd');
+ ->allowEmpty('cd')
+ ->add('cd', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
return $validator;
}
--- /dev/null
+<?php
+namespace App\Model\Table;
+
+use App\Model\Entity\RelationshipsSoftware;
+use Cake\ORM\Query;
+use Cake\ORM\RulesChecker;
+use Cake\ORM\Table;
+use Cake\Validation\Validator;
+
+/**
+ * RelationshipsSoftwares Model
+ *
+ * @property \Cake\ORM\Association\BelongsTo $Softwares
+ * @property \Cake\ORM\Association\BelongsTo $Relationships
+ * @property \Cake\ORM\Association\BelongsTo $Softwares
+ * @property \Cake\ORM\Association\BelongsToMany $Users
+ */
+class RelationshipsSoftwaresTable extends Table
+{
+
+ /**
+ * Initialize method
+ *
+ * @param array $config The configuration for the Table.
+ * @return void
+ */
+ public function initialize(array $config)
+ {
+ parent::initialize($config);
+
+ $this->table('relationships_softwares');
+ $this->displayField('id');
+ $this->primaryKey('id');
+
+ $this->addBehavior('Timestamp');
+
+ $this->belongsTo('Softwares', [
+ 'foreignKey' => 'software_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Relationships', [
+ 'foreignKey' => 'relationship_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Softwares', [
+ 'foreignKey' => 'recipient_id',
+ 'joinType' => 'INNER'
+ ]);
+// $this->belongsToMany('Users', [
+// 'foreignKey' => 'relationships_software_id',
+// 'targetForeignKey' => 'user_id',
+// 'joinTable' => 'relationships_softwares_users'
+// ]);
+ }
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+ return $validator;
+ }
+
+ /**
+ * Returns a rules checker object that will be used for validating
+ * application integrity.
+ *
+ * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
+ * @return \Cake\ORM\RulesChecker
+ */
+ public function buildRules(RulesChecker $rules)
+ {
+ $rules->add($rules->existsIn(['software_id'], 'Softwares'));
+ $rules->add($rules->existsIn(['relationship_id'], 'Relationships'));
+ $rules->add($rules->existsIn(['recipient_id'], 'Softwares'));
+ return $rules;
+ }
+}
--- /dev/null
+<?php
+namespace App\Model\Table;
+
+use App\Model\Entity\RelationshipsSoftwaresUser;
+use Cake\ORM\Query;
+use Cake\ORM\RulesChecker;
+use Cake\ORM\Table;
+use Cake\Validation\Validator;
+
+/**
+ * RelationshipsSoftwaresUsers Model
+ *
+ * @property \Cake\ORM\Association\BelongsTo $Softwares
+ * @property \Cake\ORM\Association\BelongsTo $Users
+ * @property \Cake\ORM\Association\BelongsTo $Relationships
+ */
+class RelationshipsSoftwaresUsersTable extends Table
+{
+
+ /**
+ * Initialize method
+ *
+ * @param array $config The configuration for the Table.
+ * @return void
+ */
+ public function initialize(array $config)
+ {
+ parent::initialize($config);
+
+ $this->table('relationships_softwares_users');
+ $this->displayField('id');
+ $this->primaryKey('id');
+
+ $this->addBehavior('Timestamp');
+
+ $this->belongsTo('Softwares', [
+ 'foreignKey' => 'software_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Users', [
+ 'foreignKey' => 'user_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Relationships', [
+ 'foreignKey' => 'relationship_id',
+ 'joinType' => 'INNER'
+ ]);
+ }
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+
+ return $validator;
+ }
+
+ /**
+ * Returns a rules checker object that will be used for validating
+ * application integrity.
+ *
+ * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
+ * @return \Cake\ORM\RulesChecker
+ */
+ public function buildRules(RulesChecker $rules)
+ {
+ $rules->add($rules->existsIn(['software_id'], 'Softwares'));
+ $rules->add($rules->existsIn(['user_id'], 'Users'));
+ $rules->add($rules->existsIn(['relationship_id'], 'Relationships'));
+ return $rules;
+ }
+}
--- /dev/null
+<?php
+namespace App\Model\Table;
+
+use App\Model\Entity\Relationship;
+use Cake\ORM\Query;
+use Cake\ORM\RulesChecker;
+use Cake\ORM\Table;
+use Cake\Validation\Validator;
+
+/**
+ * Relationships Model
+ *
+ * @property \Cake\ORM\Association\BelongsTo $RelationshipTypes
+ * @property \Cake\ORM\Association\BelongsToMany $Softwares
+ * @property \Cake\ORM\Association\BelongsToMany $Users
+ */
+class RelationshipsTable extends Table
+{
+
+ /**
+ * Initialize method
+ *
+ * @param array $config The configuration for the Table.
+ * @return void
+ */
+ public function initialize(array $config)
+ {
+ parent::initialize($config);
+
+ $this->table('relationships');
+ $this->displayField('name');
+ $this->primaryKey('id');
+
+ $this->addBehavior('Timestamp');
+
+ $this->belongsTo('RelationshipTypes', [
+ 'foreignKey' => 'relationship_type_id'
+ ]);
+ $this->belongsToMany('Softwares', [
+ 'foreignKey' => 'relationship_id',
+ 'targetForeignKey' => 'software_id',
+ 'joinTable' => 'softwares_relationships'
+ ]);
+ $this->belongsToMany('Users', [
+ 'foreignKey' => 'relationship_id',
+ 'targetForeignKey' => 'user_id',
+ 'joinTable' => 'users_relationships'
+ ]);
+ }
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+
+ $validator
+ ->requirePresence('name', 'create')
+ ->notEmpty('name');
+
+ $validator
+ ->allowEmpty('cd');
+
+ return $validator;
+ }
+
+ /**
+ * Returns a rules checker object that will be used for validating
+ * application integrity.
+ *
+ * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
+ * @return \Cake\ORM\RulesChecker
+ */
+ public function buildRules(RulesChecker $rules)
+ {
+ $rules->add($rules->existsIn(['relationship_type_id'], 'RelationshipTypes'));
+ return $rules;
+ }
+}
--- /dev/null
+<?php
+namespace App\Model\Table;
+
+use App\Model\Entity\RelationshipsUser;
+use Cake\ORM\Query;
+use Cake\ORM\RulesChecker;
+use Cake\ORM\Table;
+use Cake\Validation\Validator;
+
+/**
+ * RelationshipsUsers Model
+ *
+ * @property \Cake\ORM\Association\BelongsTo $Users
+ * @property \Cake\ORM\Association\BelongsTo $Users
+ * @property \Cake\ORM\Association\BelongsTo $Relationships
+ */
+class RelationshipsUsersTable extends Table
+{
+
+ /**
+ * Initialize method
+ *
+ * @param array $config The configuration for the Table.
+ * @return void
+ */
+ public function initialize(array $config)
+ {
+ parent::initialize($config);
+
+ $this->table('relationships_users');
+ $this->displayField('id');
+ $this->primaryKey('id');
+
+ $this->addBehavior('Timestamp');
+
+ $this->belongsTo('Users', [
+ 'foreignKey' => 'user_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Users', [
+ 'foreignKey' => 'recipient_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Relationships', [
+ 'foreignKey' => 'relationship_id',
+ 'joinType' => 'INNER'
+ ]);
+ }
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+
+ return $validator;
+ }
+
+ /**
+ * Returns a rules checker object that will be used for validating
+ * application integrity.
+ *
+ * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
+ * @return \Cake\ORM\RulesChecker
+ */
+ public function buildRules(RulesChecker $rules)
+ {
+ $rules->add($rules->existsIn(['user_id'], 'Users'));
+ $rules->add($rules->existsIn(['recipient_id'], 'Users'));
+ $rules->add($rules->existsIn(['relationship_id'], 'Relationships'));
+ return $rules;
+ }
+}
* SoftwaresRelationships Model
*
* @property \Cake\ORM\Association\BelongsTo $Softwares
- * @property \Cake\ORM\Association\BelongsTo $Recipients
- * @property \Cake\ORM\Association\BelongsTo $RelationshipTypes
+ * @property \Cake\ORM\Association\BelongsTo $Relationships
+ * @property \Cake\ORM\Association\BelongsTo $Softwares
*/
class SoftwaresRelationshipsTable extends Table
{
parent::initialize($config);
$this->table('softwares_relationships');
- $this->displayField('software_id');
- $this->primaryKey(['software_id', 'recipient_id', 'relationship_type_id']);
+ $this->displayField('id');
+ $this->primaryKey('id');
$this->addBehavior('Timestamp');
'foreignKey' => 'software_id',
'joinType' => 'INNER'
]);
- $this->belongsTo('Recipients', [
- 'foreignKey' => 'recipient_id',
+ $this->belongsTo('Relationships', [
+ 'foreignKey' => 'relationship_id',
'joinType' => 'INNER'
]);
- $this->belongsTo('RelationshipTypes', [
- 'foreignKey' => 'relationship_type_id',
+ $this->belongsTo('Recipients', [
+ 'className' => 'Softwares',
+ 'foreignKey' => 'recipient_id',
+ 'bindingKey' => 'id',
'joinType' => 'INNER'
]);
}
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+
+ return $validator;
+ }
+
/**
* Returns a rules checker object that will be used for validating
* application integrity.
public function buildRules(RulesChecker $rules)
{
$rules->add($rules->existsIn(['software_id'], 'Softwares'));
- $rules->add($rules->existsIn(['recipient_id'], 'Recipients'));
- $rules->add($rules->existsIn(['relationship_type_id'], 'RelationshipTypes'));
+ $rules->add($rules->existsIn(['relationship_id'], 'Relationships'));
+ $rules->add($rules->existsIn(['recipient_id'], 'Softwares'));
return $rules;
}
}
* @property \Cake\ORM\Association\BelongsTo $Licenses
* @property \Cake\ORM\Association\HasMany $Reviews
* @property \Cake\ORM\Association\HasMany $Screenshots
+ * @property \Cake\ORM\Association\BelongsToMany $Relationships
*/
class SoftwaresTable extends Table
{
parent::initialize($config);
$this->table('softwares');
- $this->displayField('id');
+ $this->displayField('softwarename');
$this->primaryKey('id');
$this->addBehavior('Timestamp');
- //For upload file -> avatar
- $this->addBehavior('Josegonzalez/Upload.Upload', [
- 'photo' => [
- 'fields' => [
- 'dir' => 'logo_directory',
- ],
- 'path' => 'webroot{DS}files{DS}{model}{DS}{field}{DS}{primaryKey}{DS}avatar',
- ],
- ]);
-
-
$this->belongsTo('Licenses', [
'foreignKey' => 'licence_id'
]);
$this->hasMany('Screenshots', [
'foreignKey' => 'software_id'
]);
-
-
+ $this->belongsToMany('Relationships', [
+ 'foreignKey' => 'software_id',
+ 'targetForeignKey' => 'relationship_id',
+ 'joinTable' => 'softwares_relationships'
+ ]);
}
/**
->allowEmpty('id', 'create');
$validator
- ->allowEmpty('softwarename', 'create');
+ ->allowEmpty('softwarename')
+ ->add('softwarename', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);
$validator
->requirePresence('url_repository', 'create')
->allowEmpty('description');
$validator
- ->allowEmpty('photo');
+ ->allowEmpty('logo_directory');
$validator
- ->allowEmpty('logo_directory');
+ ->allowEmpty('photo');
return $validator;
}
--- /dev/null
+<?php
+namespace App\Model\Table;
+
+use App\Model\Entity\UsersRelationshipsSoftware;
+use Cake\ORM\Query;
+use Cake\ORM\RulesChecker;
+use Cake\ORM\Table;
+use Cake\Validation\Validator;
+
+/**
+ * UsersRelationshipsSoftwares Model
+ *
+ * @property \Cake\ORM\Association\BelongsTo $Softwares
+ * @property \Cake\ORM\Association\BelongsTo $Users
+ * @property \Cake\ORM\Association\BelongsTo $Relationships
+ */
+class UsersRelationshipsSoftwaresTable extends Table
+{
+
+ /**
+ * Initialize method
+ *
+ * @param array $config The configuration for the Table.
+ * @return void
+ */
+ public function initialize(array $config)
+ {
+ parent::initialize($config);
+
+ $this->table('users_relationships_softwares');
+ $this->displayField('id');
+ $this->primaryKey('id');
+
+ $this->addBehavior('Timestamp');
+
+ $this->belongsTo('Softwares', [
+ 'foreignKey' => 'software_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Users', [
+ 'foreignKey' => 'user_id',
+ 'joinType' => 'INNER'
+ ]);
+ $this->belongsTo('Relationships', [
+ 'foreignKey' => 'relationship_id',
+ 'joinType' => 'INNER'
+ ]);
+ }
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+
+ return $validator;
+ }
+
+ /**
+ * Returns a rules checker object that will be used for validating
+ * application integrity.
+ *
+ * @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
+ * @return \Cake\ORM\RulesChecker
+ */
+ public function buildRules(RulesChecker $rules)
+ {
+ $rules->add($rules->existsIn(['software_id'], 'Softwares'));
+ $rules->add($rules->existsIn(['user_id'], 'Users'));
+ $rules->add($rules->existsIn(['relationship_id'], 'Relationships'));
+ return $rules;
+ }
+}
* UsersRelationships Model
*
* @property \Cake\ORM\Association\BelongsTo $Users
- * @property \Cake\ORM\Association\BelongsTo $Recipients
- * @property \Cake\ORM\Association\BelongsTo $RelationshipTypes
+ * @property \Cake\ORM\Association\BelongsTo $Users
+ * @property \Cake\ORM\Association\BelongsTo $Relationships
+ * @property \Cake\ORM\Association\BelongsToMany $Softwares
*/
class UsersRelationshipsTable extends Table
{
'joinType' => 'INNER'
]);
$this->belongsTo('Recipients', [
+ 'className' => 'Users',
'foreignKey' => 'recipient_id',
+ 'bindingKey' => 'id',
'joinType' => 'INNER'
]);
- $this->belongsTo('RelationshipTypes', [
- 'foreignKey' => 'relationship_type_id',
+ $this->belongsTo('Relationships', [
+ 'foreignKey' => 'relationship_id',
'joinType' => 'INNER'
]);
+ $this->belongsToMany('Softwares', [
+ 'foreignKey' => 'users_relationship_id',
+ 'targetForeignKey' => 'software_id',
+ 'joinTable' => 'users_relationships_softwares'
+ ]);
+ }
+
+ /**
+ * Default validation rules.
+ *
+ * @param \Cake\Validation\Validator $validator Validator instance.
+ * @return \Cake\Validation\Validator
+ */
+ public function validationDefault(Validator $validator)
+ {
+ $validator
+ ->allowEmpty('id', 'create');
+
+ return $validator;
}
/**
public function buildRules(RulesChecker $rules)
{
$rules->add($rules->existsIn(['user_id'], 'Users'));
- $rules->add($rules->existsIn(['recipient_id'], 'Recipients'));
- $rules->add($rules->existsIn(['relationship_type_id'], 'RelationshipTypes'));
+ $rules->add($rules->existsIn(['recipient_id'], 'Users'));
+ $rules->add($rules->existsIn(['relationship_id'], 'Relationships'));
return $rules;
}
}
* Users Model
*
* @property \Cake\ORM\Association\BelongsTo $UserTypes
+ * @property \Cake\ORM\Association\HasMany $Reviews
+ * @property \Cake\ORM\Association\BelongsToMany $RelationshipsSoftwares
+ * @property \Cake\ORM\Association\BelongsToMany $Relationships
*/
class UsersTable extends Table
{
parent::initialize($config);
$this->table('users');
- $this->displayField('id');
+ $this->displayField('username');
$this->primaryKey('id');
$this->addBehavior('Timestamp');
-
+
//For upload file -> avatar
$this->addBehavior('Josegonzalez/Upload.Upload', [
'photo' => [
'path' => 'webroot{DS}files{DS}{model}{DS}{field}{DS}{primaryKey}{DS}avatar',
],
]);
-
-
+
$this->belongsTo('UserTypes', [
'foreignKey' => 'user_type_id',
'joinType' => 'INNER'
]);
+ $this->hasMany('Reviews', [
+ 'foreignKey' => 'user_id'
+ ]);
+// $this->belongsToMany('RelationshipsSoftwares', [
+// 'foreignKey' => 'user_id',
+// 'targetForeignKey' => 'relationships_software_id',
+// 'joinTable' => 'relationships_softwares_users'
+// ]);
+// $this->belongsToMany('Relationships', [
+// 'foreignKey' => 'user_id',
+// 'targetForeignKey' => 'relationship_id',
+// 'joinTable' => 'relationships_users'
+// ]);
}
/**
->allowEmpty('username');
$validator
- ->allowEmpty('logo_url');
+ ->allowEmpty('logo_directory');
$validator
->allowEmpty('url');
$validator
->requirePresence('password', 'create')
->notEmpty('password');
-
+
$validator
- ->requirePresence('email', 'create')
- ->notEmpty('email');
-
+ ->add('email', 'valid', ['rule' => 'email'])
+ ->allowEmpty('email');
+
+ $validator
+ ->allowEmpty('photo');
+
return $validator;
}
public function buildRules(RulesChecker $rules)
{
$rules->add($rules->isUnique(['username']));
+ $rules->add($rules->isUnique(['email']));
$rules->add($rules->existsIn(['user_type_id'], 'UserTypes'));
return $rules;
}
-
}
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipTypes form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipType) ?>
+ <fieldset>
+ <legend><?= __('Add Relationship Type') ?></legend>
+ <?php
+ echo $this->Form->input('name');
+ echo $this->Form->input('cd');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $relationshipType->id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipType->id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipTypes form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipType) ?>
+ <fieldset>
+ <legend><?= __('Edit Relationship Type') ?></legend>
+ <?php
+ echo $this->Form->input('name');
+ echo $this->Form->input('cd');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipTypes index large-9 medium-8 columns content">
+ <h3><?= __('Relationship Types') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($relationshipTypes as $relationshipType): ?>
+ <tr>
+ <td><?= $this->Number->format($relationshipType->id) ?></td>
+ <td><?= h($relationshipType->created) ?></td>
+ <td><?= h($relationshipType->modified) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $relationshipType->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $relationshipType->id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $relationshipType->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipType->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Relationship Type'), ['action' => 'edit', $relationshipType->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Relationship Type'), ['action' => 'delete', $relationshipType->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipType->id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="relationshipTypes view large-9 medium-8 columns content">
+ <h3><?= h($relationshipType->name) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($relationshipType->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($relationshipType->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($relationshipType->modified) ?></td>
+ </tr>
+ </table>
+ <div class="row">
+ <h4><?= __('Name') ?></h4>
+ <?= $this->Text->autoParagraph(h($relationshipType->name)); ?>
+ </div>
+ <div class="row">
+ <h4><?= __('Cd') ?></h4>
+ <?= $this->Text->autoParagraph(h($relationshipType->cd)); ?>
+ </div>
+ <div class="related">
+ <h4><?= __('Related Relationships') ?></h4>
+ <?php if (!empty($relationshipType->relationships)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Name') ?></th>
+ <th><?= __('Created') ?></th>
+ <th><?= __('Modified') ?></th>
+ <th><?= __('Cd') ?></th>
+ <th><?= __('Relationship Type Id') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($relationshipType->relationships as $relationships): ?>
+ <tr>
+ <td><?= h($relationships->id) ?></td>
+ <td><?= h($relationships->name) ?></td>
+ <td><?= h($relationships->created) ?></td>
+ <td><?= h($relationships->modified) ?></td>
+ <td><?= h($relationships->cd) ?></td>
+ <td><?= h($relationships->relationship_type_id) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Relationships', 'action' => 'view', $relationships->id]) ?>
+
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Relationships', 'action' => 'edit', $relationships->id]) ?>
+
+ <?= $this->Form->postLink(__('Delete'), ['controller' => 'Relationships', 'action' => 'delete', $relationships->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationships->id)]) ?>
+
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationships form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationship) ?>
+ <fieldset>
+ <legend><?= __('Add Relationship') ?></legend>
+ <?php
+ echo $this->Form->input('name');
+ echo $this->Form->input('cd');
+ echo $this->Form->input('relationship_type_id', ['options' => $relationshipTypes, 'empty' => true]);
+ //echo $this->Form->input('softwares._ids', ['options' => $softwares]);
+ //echo $this->Form->input('users._ids', ['options' => $users]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $relationship->id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $relationship->id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationships form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationship) ?>
+ <fieldset>
+ <legend><?= __('Edit Relationship') ?></legend>
+ <?php
+ echo $this->Form->input('name');
+ echo $this->Form->input('cd');
+ echo $this->Form->input('relationship_type_id', ['options' => $relationshipTypes, 'empty' => true]);
+ echo $this->Form->input('softwares._ids', ['options' => $softwares]);
+ echo $this->Form->input('users._ids', ['options' => $users]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationships index large-9 medium-8 columns content">
+ <h3><?= __('Relationships') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th><?= $this->Paginator->sort('relationship_type_id') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($relationships as $relationship): ?>
+ <tr>
+ <td><?= $this->Number->format($relationship->id) ?></td>
+ <td><?= h($relationship->created) ?></td>
+ <td><?= h($relationship->modified) ?></td>
+ <td><?= $relationship->has('relationship_type') ? $this->Html->link($relationship->relationship_type->name, ['controller' => 'RelationshipTypes', 'action' => 'view', $relationship->relationship_type->id]) : '' ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $relationship->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $relationship->id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $relationship->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationship->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Relationship'), ['action' => 'edit', $relationship->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Relationship'), ['action' => 'delete', $relationship->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationship->id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="relationships view large-9 medium-8 columns content">
+ <h3><?= h($relationship->name) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Relationship Type') ?></th>
+ <td><?= $relationship->has('relationship_type') ? $this->Html->link($relationship->relationship_type->name, ['controller' => 'RelationshipTypes', 'action' => 'view', $relationship->relationship_type->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($relationship->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($relationship->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($relationship->modified) ?></td>
+ </tr>
+ </table>
+ <div class="row">
+ <h4><?= __('Name') ?></h4>
+ <?= $this->Text->autoParagraph(h($relationship->name)); ?>
+ </div>
+ <div class="row">
+ <h4><?= __('Cd') ?></h4>
+ <?= $this->Text->autoParagraph(h($relationship->cd)); ?>
+ </div>
+ <div class="related">
+ <h4><?= __('Related Softwares') ?></h4>
+ <?php if (!empty($relationship->softwares)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Softwarename') ?></th>
+ <th><?= __('Url Repository') ?></th>
+ <th><?= __('Description') ?></th>
+ <th><?= __('Licence Id') ?></th>
+ <th><?= __('Created') ?></th>
+ <th><?= __('Modified') ?></th>
+ <th><?= __('Logo Directory') ?></th>
+ <th><?= __('Photo') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($relationship->softwares as $softwares): ?>
+ <tr>
+ <td><?= h($softwares->id) ?></td>
+ <td><?= h($softwares->softwarename) ?></td>
+ <td><?= h($softwares->url_repository) ?></td>
+ <td><?= h($softwares->description) ?></td>
+ <td><?= h($softwares->licence_id) ?></td>
+ <td><?= h($softwares->created) ?></td>
+ <td><?= h($softwares->modified) ?></td>
+ <td><?= h($softwares->logo_directory) ?></td>
+ <td><?= h($softwares->photo) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Softwares', 'action' => 'view', $softwares->id]) ?>
+
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Softwares', 'action' => 'edit', $softwares->id]) ?>
+
+ <?= $this->Form->postLink(__('Delete'), ['controller' => 'Softwares', 'action' => 'delete', $softwares->id], ['confirm' => __('Are you sure you want to delete # {0}?', $softwares->id)]) ?>
+
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+ <div class="related">
+ <h4><?= __('Related Users') ?></h4>
+ <?php if (!empty($relationship->users)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Username') ?></th>
+ <th><?= __('Created') ?></th>
+ <th><?= __('Logo Directory') ?></th>
+ <th><?= __('Url') ?></th>
+ <th><?= __('User Type Id') ?></th>
+ <th><?= __('Description') ?></th>
+ <th><?= __('Modified') ?></th>
+ <th><?= __('Role') ?></th>
+ <th><?= __('Password') ?></th>
+ <th><?= __('Email') ?></th>
+ <th><?= __('Photo') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($relationship->users as $users): ?>
+ <tr>
+ <td><?= h($users->id) ?></td>
+ <td><?= h($users->username) ?></td>
+ <td><?= h($users->created) ?></td>
+ <td><?= h($users->logo_directory) ?></td>
+ <td><?= h($users->url) ?></td>
+ <td><?= h($users->user_type_id) ?></td>
+ <td><?= h($users->description) ?></td>
+ <td><?= h($users->modified) ?></td>
+ <td><?= h($users->role) ?></td>
+ <td><?= h($users->password) ?></td>
+ <td><?= h($users->email) ?></td>
+ <td><?= h($users->photo) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Users', 'action' => 'view', $users->id]) ?>
+
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Users', 'action' => 'edit', $users->id]) ?>
+
+ <?= $this->Form->postLink(__('Delete'), ['controller' => 'Users', 'action' => 'delete', $users->id], ['confirm' => __('Are you sure you want to delete # {0}?', $users->id)]) ?>
+
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Relationships Softwares'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwares form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipsSoftware) ?>
+ <fieldset>
+ <legend><?= __('Add Relationships Software') ?></legend>
+ <?php
+ echo $this->Form->input('software_id');
+ echo $this->Form->input('relationship_id', ['options' => $relationships]);
+ echo $this->Form->input('recipient_id', ['options' => $softwares]);
+ echo $this->Form->input('users._ids', ['options' => $users]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $relationshipsSoftware->id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsSoftware->id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Relationships Softwares'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwares form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipsSoftware) ?>
+ <fieldset>
+ <legend><?= __('Edit Relationships Software') ?></legend>
+ <?php
+ echo $this->Form->input('software_id');
+ echo $this->Form->input('relationship_id', ['options' => $relationships]);
+ echo $this->Form->input('recipient_id', ['options' => $softwares]);
+ echo $this->Form->input('users._ids', ['options' => $users]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Relationships Software'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwares index large-9 medium-8 columns content">
+ <h3><?= __('Relationships Softwares') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('software_id') ?></th>
+ <th><?= $this->Paginator->sort('relationship_id') ?></th>
+ <th><?= $this->Paginator->sort('recipient_id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($relationshipsSoftwares as $relationshipsSoftware): ?>
+ <tr>
+ <td><?= $this->Number->format($relationshipsSoftware->id) ?></td>
+ <td><?= $this->Number->format($relationshipsSoftware->software_id) ?></td>
+ <td><?= $relationshipsSoftware->has('relationship') ? $this->Html->link($relationshipsSoftware->relationship->name, ['controller' => 'Relationships', 'action' => 'view', $relationshipsSoftware->relationship->id]) : '' ?></td>
+ <td><?= $relationshipsSoftware->has('software') ? $this->Html->link($relationshipsSoftware->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $relationshipsSoftware->software->id]) : '' ?></td>
+ <td><?= h($relationshipsSoftware->created) ?></td>
+ <td><?= h($relationshipsSoftware->modified) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $relationshipsSoftware->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $relationshipsSoftware->id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $relationshipsSoftware->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsSoftware->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Relationships Software'), ['action' => 'edit', $relationshipsSoftware->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Relationships Software'), ['action' => 'delete', $relationshipsSoftware->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsSoftware->id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships Softwares'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationships Software'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwares view large-9 medium-8 columns content">
+ <h3><?= h($relationshipsSoftware->id) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Relationship') ?></th>
+ <td><?= $relationshipsSoftware->has('relationship') ? $this->Html->link($relationshipsSoftware->relationship->name, ['controller' => 'Relationships', 'action' => 'view', $relationshipsSoftware->relationship->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Software') ?></th>
+ <td><?= $relationshipsSoftware->has('software') ? $this->Html->link($relationshipsSoftware->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $relationshipsSoftware->software->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($relationshipsSoftware->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Software Id') ?></th>
+ <td><?= $this->Number->format($relationshipsSoftware->software_id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($relationshipsSoftware->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($relationshipsSoftware->modified) ?></td>
+ </tr>
+ </table>
+ <div class="related">
+ <h4><?= __('Related Users') ?></h4>
+ <?php if (!empty($relationshipsSoftware->users)): ?>
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <th><?= __('Id') ?></th>
+ <th><?= __('Username') ?></th>
+ <th><?= __('Created') ?></th>
+ <th><?= __('Logo Directory') ?></th>
+ <th><?= __('Url') ?></th>
+ <th><?= __('User Type Id') ?></th>
+ <th><?= __('Description') ?></th>
+ <th><?= __('Modified') ?></th>
+ <th><?= __('Role') ?></th>
+ <th><?= __('Password') ?></th>
+ <th><?= __('Email') ?></th>
+ <th><?= __('Photo') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ <?php foreach ($relationshipsSoftware->users as $users): ?>
+ <tr>
+ <td><?= h($users->id) ?></td>
+ <td><?= h($users->username) ?></td>
+ <td><?= h($users->created) ?></td>
+ <td><?= h($users->logo_directory) ?></td>
+ <td><?= h($users->url) ?></td>
+ <td><?= h($users->user_type_id) ?></td>
+ <td><?= h($users->description) ?></td>
+ <td><?= h($users->modified) ?></td>
+ <td><?= h($users->role) ?></td>
+ <td><?= h($users->password) ?></td>
+ <td><?= h($users->email) ?></td>
+ <td><?= h($users->photo) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['controller' => 'Users', 'action' => 'view', $users->id]) ?>
+
+ <?= $this->Html->link(__('Edit'), ['controller' => 'Users', 'action' => 'edit', $users->id]) ?>
+
+ <?= $this->Form->postLink(__('Delete'), ['controller' => 'Users', 'action' => 'delete', $users->id], ['confirm' => __('Are you sure you want to delete # {0}?', $users->id)]) ?>
+
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </table>
+ <?php endif; ?>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Relationships Softwares Users'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwaresUsers form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipsSoftwaresUser) ?>
+ <fieldset>
+ <legend><?= __('Add Relationships Softwares User') ?></legend>
+ <?php
+ echo $this->Form->input('software_id', ['options' => $softwares]);
+ echo $this->Form->input('user_id', ['options' => $users]);
+ echo $this->Form->input('relationship_id', ['options' => $relationships]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $relationshipsSoftwaresUser->id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsSoftwaresUser->id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Relationships Softwares Users'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwaresUsers form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipsSoftwaresUser) ?>
+ <fieldset>
+ <legend><?= __('Edit Relationships Softwares User') ?></legend>
+ <?php
+ echo $this->Form->input('software_id', ['options' => $softwares]);
+ echo $this->Form->input('user_id', ['options' => $users]);
+ echo $this->Form->input('relationship_id', ['options' => $relationships]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Relationships Softwares User'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwaresUsers index large-9 medium-8 columns content">
+ <h3><?= __('Relationships Softwares Users') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('software_id') ?></th>
+ <th><?= $this->Paginator->sort('user_id') ?></th>
+ <th><?= $this->Paginator->sort('relationship_id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($relationshipsSoftwaresUsers as $relationshipsSoftwaresUser): ?>
+ <tr>
+ <td><?= $this->Number->format($relationshipsSoftwaresUser->id) ?></td>
+ <td><?= $relationshipsSoftwaresUser->has('software') ? $this->Html->link($relationshipsSoftwaresUser->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $relationshipsSoftwaresUser->software->id]) : '' ?></td>
+ <td><?= $relationshipsSoftwaresUser->has('user') ? $this->Html->link($relationshipsSoftwaresUser->user->id, ['controller' => 'Users', 'action' => 'view', $relationshipsSoftwaresUser->user->id]) : '' ?></td>
+ <td><?= $relationshipsSoftwaresUser->has('relationship') ? $this->Html->link($relationshipsSoftwaresUser->relationship->name, ['controller' => 'Relationships', 'action' => 'view', $relationshipsSoftwaresUser->relationship->id]) : '' ?></td>
+ <td><?= h($relationshipsSoftwaresUser->created) ?></td>
+ <td><?= h($relationshipsSoftwaresUser->modified) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $relationshipsSoftwaresUser->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $relationshipsSoftwaresUser->id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $relationshipsSoftwaresUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsSoftwaresUser->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Relationships Softwares User'), ['action' => 'edit', $relationshipsSoftwaresUser->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Relationships Softwares User'), ['action' => 'delete', $relationshipsSoftwaresUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsSoftwaresUser->id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships Softwares Users'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationships Softwares User'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="relationshipsSoftwaresUsers view large-9 medium-8 columns content">
+ <h3><?= h($relationshipsSoftwaresUser->id) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Software') ?></th>
+ <td><?= $relationshipsSoftwaresUser->has('software') ? $this->Html->link($relationshipsSoftwaresUser->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $relationshipsSoftwaresUser->software->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('User') ?></th>
+ <td><?= $relationshipsSoftwaresUser->has('user') ? $this->Html->link($relationshipsSoftwaresUser->user->id, ['controller' => 'Users', 'action' => 'view', $relationshipsSoftwaresUser->user->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Relationship') ?></th>
+ <td><?= $relationshipsSoftwaresUser->has('relationship') ? $this->Html->link($relationshipsSoftwaresUser->relationship->name, ['controller' => 'Relationships', 'action' => 'view', $relationshipsSoftwaresUser->relationship->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($relationshipsSoftwaresUser->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($relationshipsSoftwaresUser->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($relationshipsSoftwaresUser->modified) ?></td>
+ </tr>
+ </table>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Relationships Users'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsUsers form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipsUser) ?>
+ <fieldset>
+ <legend><?= __('Add Relationships User') ?></legend>
+ <?php
+ echo $this->Form->input('user_id');
+ echo $this->Form->input('recipient_id', ['options' => $users]);
+ echo $this->Form->input('relationship_id', ['options' => $relationships]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $relationshipsUser->id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsUser->id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Relationships Users'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsUsers form large-9 medium-8 columns content">
+ <?= $this->Form->create($relationshipsUser) ?>
+ <fieldset>
+ <legend><?= __('Edit Relationships User') ?></legend>
+ <?php
+ echo $this->Form->input('user_id');
+ echo $this->Form->input('recipient_id', ['options' => $users]);
+ echo $this->Form->input('relationship_id', ['options' => $relationships]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Relationships User'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="relationshipsUsers index large-9 medium-8 columns content">
+ <h3><?= __('Relationships Users') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('user_id') ?></th>
+ <th><?= $this->Paginator->sort('recipient_id') ?></th>
+ <th><?= $this->Paginator->sort('relationship_id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($relationshipsUsers as $relationshipsUser): ?>
+ <tr>
+ <td><?= $this->Number->format($relationshipsUser->id) ?></td>
+ <td><?= $this->Number->format($relationshipsUser->user_id) ?></td>
+ <td><?= $relationshipsUser->has('user') ? $this->Html->link($relationshipsUser->user->id, ['controller' => 'Users', 'action' => 'view', $relationshipsUser->user->id]) : '' ?></td>
+ <td><?= $relationshipsUser->has('relationship') ? $this->Html->link($relationshipsUser->relationship->name, ['controller' => 'Relationships', 'action' => 'view', $relationshipsUser->relationship->id]) : '' ?></td>
+ <td><?= h($relationshipsUser->created) ?></td>
+ <td><?= h($relationshipsUser->modified) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $relationshipsUser->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $relationshipsUser->id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $relationshipsUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsUser->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Relationships User'), ['action' => 'edit', $relationshipsUser->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Relationships User'), ['action' => 'delete', $relationshipsUser->id], ['confirm' => __('Are you sure you want to delete # {0}?', $relationshipsUser->id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships Users'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationships User'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationships'), ['controller' => 'Relationships', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship'), ['controller' => 'Relationships', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="relationshipsUsers view large-9 medium-8 columns content">
+ <h3><?= h($relationshipsUser->id) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('User') ?></th>
+ <td><?= $relationshipsUser->has('user') ? $this->Html->link($relationshipsUser->user->id, ['controller' => 'Users', 'action' => 'view', $relationshipsUser->user->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Relationship') ?></th>
+ <td><?= $relationshipsUser->has('relationship') ? $this->Html->link($relationshipsUser->relationship->name, ['controller' => 'Relationships', 'action' => 'view', $relationshipsUser->relationship->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($relationshipsUser->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('User Id') ?></th>
+ <td><?= $this->Number->format($relationshipsUser->user_id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($relationshipsUser->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($relationshipsUser->modified) ?></td>
+ </tr>
+ </table>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Reviews'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="reviews form large-9 medium-8 columns content">
+ <?= $this->Form->create($review) ?>
+ <fieldset>
+ <legend><?= __('Add Review') ?></legend>
+ <?php
+ echo $this->Form->input('comment');
+ echo $this->Form->input('title');
+ echo $this->Form->input('user_id', ['options' => $users, 'empty' => true]);
+ echo $this->Form->input('software_id', ['options' => $softwares, 'empty' => true]);
+ echo $this->Form->input('evaluation');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $review->id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $review->id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Reviews'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="reviews form large-9 medium-8 columns content">
+ <?= $this->Form->create($review) ?>
+ <fieldset>
+ <legend><?= __('Edit Review') ?></legend>
+ <?php
+ echo $this->Form->input('comment');
+ echo $this->Form->input('title');
+ echo $this->Form->input('user_id', ['options' => $users, 'empty' => true]);
+ echo $this->Form->input('software_id', ['options' => $softwares, 'empty' => true]);
+ echo $this->Form->input('evaluation');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Review'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="reviews index large-9 medium-8 columns content">
+ <h3><?= __('Reviews') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('user_id') ?></th>
+ <th><?= $this->Paginator->sort('software_id') ?></th>
+ <th><?= $this->Paginator->sort('evaluation') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($reviews as $review): ?>
+ <tr>
+ <td><?= $this->Number->format($review->id) ?></td>
+ <td><?= h($review->created) ?></td>
+ <td><?= $review->has('user') ? $this->Html->link($review->user->id, ['controller' => 'Users', 'action' => 'view', $review->user->id]) : '' ?></td>
+ <td><?= $review->has('software') ? $this->Html->link($review->software->id, ['controller' => 'Softwares', 'action' => 'view', $review->software->id]) : '' ?></td>
+ <td><?= $this->Number->format($review->evaluation) ?></td>
+ <td><?= h($review->modified) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $review->id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $review->id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $review->id], ['confirm' => __('Are you sure you want to delete # {0}?', $review->id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Review'), ['action' => 'edit', $review->id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Review'), ['action' => 'delete', $review->id], ['confirm' => __('Are you sure you want to delete # {0}?', $review->id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Reviews'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Review'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="reviews view large-9 medium-8 columns content">
+ <h3><?= h($review->title) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('User') ?></th>
+ <td><?= $review->has('user') ? $this->Html->link($review->user->id, ['controller' => 'Users', 'action' => 'view', $review->user->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Software') ?></th>
+ <td><?= $review->has('software') ? $this->Html->link($review->software->id, ['controller' => 'Softwares', 'action' => 'view', $review->software->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($review->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Evaluation') ?></th>
+ <td><?= $this->Number->format($review->evaluation) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($review->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($review->modified) ?></td>
+ </tr>
+ </table>
+ <div class="row">
+ <h4><?= __('Comment') ?></h4>
+ <?= $this->Text->autoParagraph(h($review->comment)); ?>
+ </div>
+ <div class="row">
+ <h4><?= __('Title') ?></h4>
+ <?= $this->Text->autoParagraph(h($review->title)); ?>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Softwares Relationships'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="softwaresRelationships form large-9 medium-8 columns content">
+ <?= $this->Form->create($softwaresRelationship) ?>
+ <fieldset>
+ <legend><?= __('Add Softwares Relationship') ?></legend>
+ <?php
+
+ echo $this->Form->input('software', ['options' => $softwares, 'empty' => true, 'name'=>'software_id']);
+
+ echo $this->Form->input('recipient', ['options' => $recipients, 'empty' => true , 'name'=>'recipient_id']);
+
+ echo $this->Form->input('relationship_type', ['options' => $relationshipTypes, 'empty' => true , 'name'=>'relationship_type_id']);
+
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $softwaresRelationship->software_id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $softwaresRelationship->software_id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Softwares Relationships'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="softwaresRelationships form large-9 medium-8 columns content">
+ <?= $this->Form->create($softwaresRelationship) ?>
+ <fieldset>
+ <legend><?= __('Edit Softwares Relationship') ?></legend>
+ <?php
+ echo $this->Form->input('id');
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Softwares Relationship'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="softwaresRelationships index large-9 medium-8 columns content">
+ <h3><?= __('Softwares Relationships') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('software_id') ?></th>
+ <th><?= $this->Paginator->sort('recipient_id') ?></th>
+ <th><?= $this->Paginator->sort('relationship_type_id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($softwaresRelationships as $softwaresRelationship): ?>
+ <tr>
+ <td><?= $softwaresRelationship->has('software') ? $this->Html->link($softwaresRelationship->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $softwaresRelationship->software->id]) : '' ?></td>
+ <td><?= $softwaresRelationship->has('recipient') ? $this->Html->link($softwaresRelationship->recipient->softwarename, ['controller' => 'Softwares', 'action' => 'view', $softwaresRelationship->recipient->id]) : '' ?></td>
+ <td><?= $softwaresRelationship->has('relationship_type') ? $this->Html->link($softwaresRelationship->relationship_type->name, ['controller' => 'RelationshipTypes', 'action' => 'view', $softwaresRelationship->relationship_type->id]) : '' ?></td>
+ <td><?= h($softwaresRelationship->created) ?></td>
+ <td><?= h($softwaresRelationship->modified) ?></td>
+ <td><?= $this->Number->format($softwaresRelationship->id) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $softwaresRelationship->software_id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $softwaresRelationship->software_id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $softwaresRelationship->software_id], ['confirm' => __('Are you sure you want to delete # {0}?', $softwaresRelationship->software_id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Softwares Relationship'), ['action' => 'edit', $softwaresRelationship->software_id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Softwares Relationship'), ['action' => 'delete', $softwaresRelationship->software_id], ['confirm' => __('Are you sure you want to delete # {0}?', $softwaresRelationship->software_id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares Relationships'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Softwares Relationship'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="softwaresRelationships view large-9 medium-8 columns content">
+ <h3><?= h($softwaresRelationship->software_id) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Software') ?></th>
+ <td><?= $softwaresRelationship->has('software') ? $this->Html->link($softwaresRelationship->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $softwaresRelationship->software->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Recipient') ?></th>
+ <td><?= $softwaresRelationship->has('recipient') ? $this->Html->link($softwaresRelationship->recipient->softwarename, ['controller' => 'Softwares', 'action' => 'view', $softwaresRelationship->recipient->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Relationship Type') ?></th>
+ <td><?= $softwaresRelationship->has('relationship_type') ? $this->Html->link($softwaresRelationship->relationship_type->name, ['controller' => 'RelationshipTypes', 'action' => 'view', $softwaresRelationship->relationship_type->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($softwaresRelationship->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($softwaresRelationship->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($softwaresRelationship->modified) ?></td>
+ </tr>
+ </table>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('List Users Relationship Types Softwares'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="usersRelationshipTypesSoftwares form large-9 medium-8 columns content">
+ <?= $this->Form->create($usersRelationshipTypesSoftware) ?>
+ <fieldset>
+ <legend><?= __('Add Users Relationship Types Software') ?></legend>
+ <?php
+ echo $this->Form->input('id');
+ echo $this->Form->input('relationship_type_id', ['options' => $relationshipTypes, 'empty' => true]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Form->postLink(
+ __('Delete'),
+ ['action' => 'delete', $usersRelationshipTypesSoftware->software_id],
+ ['confirm' => __('Are you sure you want to delete # {0}?', $usersRelationshipTypesSoftware->software_id)]
+ )
+ ?></li>
+ <li><?= $this->Html->link(__('List Users Relationship Types Softwares'), ['action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="usersRelationshipTypesSoftwares form large-9 medium-8 columns content">
+ <?= $this->Form->create($usersRelationshipTypesSoftware) ?>
+ <fieldset>
+ <legend><?= __('Edit Users Relationship Types Software') ?></legend>
+ <?php
+ echo $this->Form->input('id');
+ echo $this->Form->input('relationship_type_id', ['options' => $relationshipTypes, 'empty' => true]);
+ ?>
+ </fieldset>
+ <?= $this->Form->button(__('Submit')) ?>
+ <?= $this->Form->end() ?>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('New Users Relationship Types Software'), ['action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?></li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?></li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?></li>
+ </ul>
+</nav>
+<div class="usersRelationshipTypesSoftwares index large-9 medium-8 columns content">
+ <h3><?= __('Users Relationship Types Softwares') ?></h3>
+ <table cellpadding="0" cellspacing="0">
+ <thead>
+ <tr>
+ <th><?= $this->Paginator->sort('id') ?></th>
+ <th><?= $this->Paginator->sort('software_id') ?></th>
+ <th><?= $this->Paginator->sort('user_id') ?></th>
+ <th><?= $this->Paginator->sort('relationship_type_id') ?></th>
+ <th><?= $this->Paginator->sort('created') ?></th>
+ <th><?= $this->Paginator->sort('modified') ?></th>
+ <th class="actions"><?= __('Actions') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($usersRelationshipTypesSoftwares as $usersRelationshipTypesSoftware): ?>
+ <tr>
+ <td><?= $this->Number->format($usersRelationshipTypesSoftware->id) ?></td>
+ <td><?= $usersRelationshipTypesSoftware->has('software') ? $this->Html->link($usersRelationshipTypesSoftware->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $usersRelationshipTypesSoftware->software->id]) : '' ?></td>
+ <td><?= $usersRelationshipTypesSoftware->has('user') ? $this->Html->link($usersRelationshipTypesSoftware->user->id, ['controller' => 'Users', 'action' => 'view', $usersRelationshipTypesSoftware->user->id]) : '' ?></td>
+ <td><?= $usersRelationshipTypesSoftware->has('relationship_type') ? $this->Html->link($usersRelationshipTypesSoftware->relationship_type->name, ['controller' => 'RelationshipTypes', 'action' => 'view', $usersRelationshipTypesSoftware->relationship_type->id]) : '' ?></td>
+ <td><?= h($usersRelationshipTypesSoftware->created) ?></td>
+ <td><?= h($usersRelationshipTypesSoftware->modified) ?></td>
+ <td class="actions">
+ <?= $this->Html->link(__('View'), ['action' => 'view', $usersRelationshipTypesSoftware->software_id]) ?>
+ <?= $this->Html->link(__('Edit'), ['action' => 'edit', $usersRelationshipTypesSoftware->software_id]) ?>
+ <?= $this->Form->postLink(__('Delete'), ['action' => 'delete', $usersRelationshipTypesSoftware->software_id], ['confirm' => __('Are you sure you want to delete # {0}?', $usersRelationshipTypesSoftware->software_id)]) ?>
+ </td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div class="paginator">
+ <ul class="pagination">
+ <?= $this->Paginator->prev('< ' . __('previous')) ?>
+ <?= $this->Paginator->numbers() ?>
+ <?= $this->Paginator->next(__('next') . ' >') ?>
+ </ul>
+ <p><?= $this->Paginator->counter() ?></p>
+ </div>
+</div>
--- /dev/null
+<nav class="large-3 medium-4 columns" id="actions-sidebar">
+ <ul class="side-nav">
+ <li class="heading"><?= __('Actions') ?></li>
+ <li><?= $this->Html->link(__('Edit Users Relationship Types Software'), ['action' => 'edit', $usersRelationshipTypesSoftware->software_id]) ?> </li>
+ <li><?= $this->Form->postLink(__('Delete Users Relationship Types Software'), ['action' => 'delete', $usersRelationshipTypesSoftware->software_id], ['confirm' => __('Are you sure you want to delete # {0}?', $usersRelationshipTypesSoftware->software_id)]) ?> </li>
+ <li><?= $this->Html->link(__('List Users Relationship Types Softwares'), ['action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Users Relationship Types Software'), ['action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Softwares'), ['controller' => 'Softwares', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Software'), ['controller' => 'Softwares', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Users'), ['controller' => 'Users', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New User'), ['controller' => 'Users', 'action' => 'add']) ?> </li>
+ <li><?= $this->Html->link(__('List Relationship Types'), ['controller' => 'RelationshipTypes', 'action' => 'index']) ?> </li>
+ <li><?= $this->Html->link(__('New Relationship Type'), ['controller' => 'RelationshipTypes', 'action' => 'add']) ?> </li>
+ </ul>
+</nav>
+<div class="usersRelationshipTypesSoftwares view large-9 medium-8 columns content">
+ <h3><?= h($usersRelationshipTypesSoftware->software_id) ?></h3>
+ <table class="vertical-table">
+ <tr>
+ <th><?= __('Software') ?></th>
+ <td><?= $usersRelationshipTypesSoftware->has('software') ? $this->Html->link($usersRelationshipTypesSoftware->software->softwarename, ['controller' => 'Softwares', 'action' => 'view', $usersRelationshipTypesSoftware->software->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('User') ?></th>
+ <td><?= $usersRelationshipTypesSoftware->has('user') ? $this->Html->link($usersRelationshipTypesSoftware->user->id, ['controller' => 'Users', 'action' => 'view', $usersRelationshipTypesSoftware->user->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Relationship Type') ?></th>
+ <td><?= $usersRelationshipTypesSoftware->has('relationship_type') ? $this->Html->link($usersRelationshipTypesSoftware->relationship_type->name, ['controller' => 'RelationshipTypes', 'action' => 'view', $usersRelationshipTypesSoftware->relationship_type->id]) : '' ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Id') ?></th>
+ <td><?= $this->Number->format($usersRelationshipTypesSoftware->id) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Created') ?></th>
+ <td><?= h($usersRelationshipTypesSoftware->created) ?></td>
+ </tr>
+ <tr>
+ <th><?= __('Modified') ?></th>
+ <td><?= h($usersRelationshipTypesSoftware->modified) ?></td>
+ </tr>
+ </table>
+</div>
*/
// @codingStandardsIgnoreStart
public $fields = [
- 'id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
- 'name' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
+ 'name' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'cd' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'_constraints' => [
'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'idx_26513_cd_unique' => ['type' => 'unique', 'columns' => ['cd'], 'length' => []],
+ 'idx_26513_name_unique' => ['type' => 'unique', 'columns' => ['name'], 'length' => []],
],
];
// @codingStandardsIgnoreEnd
[
'id' => '',
'name' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
- 'created' => 1459435670,
- 'modified' => 1459435670,
+ 'created' => 1460130183,
+ 'modified' => 1460130183,
'cd' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
],
];
--- /dev/null
+<?php
+namespace App\Test\Fixture;
+
+use Cake\TestSuite\Fixture\TestFixture;
+
+/**
+ * RelationshipsFixture
+ *
+ */
+class RelationshipsFixture extends TestFixture
+{
+
+ /**
+ * Fields
+ *
+ * @var array
+ */
+ // @codingStandardsIgnoreStart
+ public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
+ 'name' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
+ 'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'cd' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'relationship_type_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ '_indexes' => [
+ 'idx_26159_fk_relationships_relationship_types_idx' => ['type' => 'index', 'columns' => ['relationship_type_id'], 'length' => []],
+ ],
+ '_constraints' => [
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_relationships_relationship_types' => ['type' => 'foreign', 'columns' => ['relationship_type_id'], 'references' => ['relationship_types', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ ],
+ ];
+ // @codingStandardsIgnoreEnd
+
+ /**
+ * Records
+ *
+ * @var array
+ */
+ public $records = [
+ [
+ 'id' => '',
+ 'name' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
+ 'created' => 1460127669,
+ 'modified' => 1460127669,
+ 'cd' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
+ 'relationship_type_id' => ''
+ ],
+ ];
+}
--- /dev/null
+<?php
+namespace App\Test\Fixture;
+
+use Cake\TestSuite\Fixture\TestFixture;
+
+/**
+ * RelationshipsSoftwaresFixture
+ *
+ */
+class RelationshipsSoftwaresFixture extends TestFixture
+{
+
+ /**
+ * Fields
+ *
+ * @var array
+ */
+ // @codingStandardsIgnoreStart
+ public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
+ 'software_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'relationship_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'recipient_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ '_indexes' => [
+ 'idx_26495_fk_software_relationship_relation_type_idx' => ['type' => 'index', 'columns' => ['relationship_id'], 'length' => []],
+ 'idx_26495_fk_software_relationship_software_from' => ['type' => 'index', 'columns' => ['software_id'], 'length' => []],
+ 'idx_26495_fk_software_relationship_to_idx' => ['type' => 'index', 'columns' => ['recipient_id'], 'length' => []],
+ ],
+ '_constraints' => [
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_software_relationship_relation_type' => ['type' => 'foreign', 'columns' => ['relationship_id'], 'references' => ['relationships', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_software_relationship_software_from' => ['type' => 'foreign', 'columns' => ['software_id'], 'references' => ['softwares', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_software_relationship_to' => ['type' => 'foreign', 'columns' => ['recipient_id'], 'references' => ['softwares', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ ],
+ ];
+ // @codingStandardsIgnoreEnd
+
+ /**
+ * Records
+ *
+ * @var array
+ */
+ public $records = [
+ [
+ 'id' => '',
+ 'software_id' => '',
+ 'relationship_id' => '',
+ 'recipient_id' => '',
+ 'created' => 1460130266,
+ 'modified' => 1460130266
+ ],
+ ];
+}
--- /dev/null
+<?php
+namespace App\Test\Fixture;
+
+use Cake\TestSuite\Fixture\TestFixture;
+
+/**
+ * RelationshipsSoftwaresUsersFixture
+ *
+ */
+class RelationshipsSoftwaresUsersFixture extends TestFixture
+{
+
+ /**
+ * Fields
+ *
+ * @var array
+ */
+ // @codingStandardsIgnoreStart
+ public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
+ 'software_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'user_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'relationship_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ '_indexes' => [
+ 'idx_26501_fk_entity_software_relationship_entity_idx' => ['type' => 'index', 'columns' => ['user_id'], 'length' => []],
+ 'idx_26501_fk_entity_software_relationship_relationship_type_idx' => ['type' => 'index', 'columns' => ['relationship_id'], 'length' => []],
+ 'idx_26501_fk_user_software_relationship_software' => ['type' => 'index', 'columns' => ['software_id'], 'length' => []],
+ ],
+ '_constraints' => [
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_entity_software_relationship_entity' => ['type' => 'foreign', 'columns' => ['user_id'], 'references' => ['users', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_user_software_relationship_relationship_type' => ['type' => 'foreign', 'columns' => ['relationship_id'], 'references' => ['relationships', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_user_software_relationship_software' => ['type' => 'foreign', 'columns' => ['software_id'], 'references' => ['softwares', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ ],
+ ];
+ // @codingStandardsIgnoreEnd
+
+ /**
+ * Records
+ *
+ * @var array
+ */
+ public $records = [
+ [
+ 'id' => '',
+ 'software_id' => '',
+ 'user_id' => '',
+ 'relationship_id' => '',
+ 'created' => 1460130288,
+ 'modified' => 1460130288
+ ],
+ ];
+}
--- /dev/null
+<?php
+namespace App\Test\Fixture;
+
+use Cake\TestSuite\Fixture\TestFixture;
+
+/**
+ * RelationshipsUsersFixture
+ *
+ */
+class RelationshipsUsersFixture extends TestFixture
+{
+
+ /**
+ * Fields
+ *
+ * @var array
+ */
+ // @codingStandardsIgnoreStart
+ public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
+ 'user_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'recipient_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'relationship_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
+ 'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ '_indexes' => [
+ 'idx_26507_fk_entities_relationships_entities_idx' => ['type' => 'index', 'columns' => ['user_id'], 'length' => []],
+ 'idx_26507_fk_entities_relationships_relationtion_types_idx' => ['type' => 'index', 'columns' => ['relationship_id'], 'length' => []],
+ 'idx_26507_fk_entities_relationships_users_recipient_idx' => ['type' => 'index', 'columns' => ['recipient_id'], 'length' => []],
+ ],
+ '_constraints' => [
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_entities_relationships_relationtion_types' => ['type' => 'foreign', 'columns' => ['relationship_id'], 'references' => ['relationships', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_entities_relationships_users' => ['type' => 'foreign', 'columns' => ['user_id'], 'references' => ['users', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_entities_relationships_users_recipient' => ['type' => 'foreign', 'columns' => ['recipient_id'], 'references' => ['users', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ ],
+ ];
+ // @codingStandardsIgnoreEnd
+
+ /**
+ * Records
+ *
+ * @var array
+ */
+ public $records = [
+ [
+ 'id' => '',
+ 'user_id' => '',
+ 'recipient_id' => '',
+ 'relationship_id' => '',
+ 'created' => 1460130256,
+ 'modified' => 1460130256
+ ],
+ ];
+}
// @codingStandardsIgnoreStart
public $fields = [
'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
- 'softwarename' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
+ 'softwarename' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'url_repository' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
'description' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'licence_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
- 'photo' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'logo_directory' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'photo' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'_indexes' => [
- 'idx_17618_fk_software_licence_idx' => ['type' => 'index', 'columns' => ['licence_id'], 'length' => []],
+ 'idx_26540_fk_software_licence_idx' => ['type' => 'index', 'columns' => ['licence_id'], 'length' => []],
],
'_constraints' => [
- 'primary' => ['type' => 'primary', 'columns' => ['id', 'softwarename'], 'length' => []],
- 'idx_17618_software_url_repository_unique' => ['type' => 'unique', 'columns' => ['url_repository'], 'length' => []],
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'idx_26540_software_url_repository_unique' => ['type' => 'unique', 'columns' => ['url_repository'], 'length' => []],
+ 'idx_26540_softwarename_unique' => ['type' => 'unique', 'columns' => ['softwarename'], 'length' => []],
'fk_software_licence' => ['type' => 'foreign', 'columns' => ['licence_id'], 'references' => ['licenses', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
],
];
'url_repository' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'licence_id' => '',
- 'created' => 1459951405,
- 'modified' => 1459951405,
- 'photo' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
- 'logo_directory' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
+ 'created' => 1460130195,
+ 'modified' => 1460130195,
+ 'logo_directory' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
+ 'photo' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
],
];
}
*/
// @codingStandardsIgnoreStart
public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
'software_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'relationship_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
'recipient_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
- 'relationship_type_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'_indexes' => [
- 'idx_17625_fk_software_relationship_relation_type_idx' => ['type' => 'index', 'columns' => ['relationship_type_id'], 'length' => []],
- 'idx_17625_fk_software_relationship_to_idx' => ['type' => 'index', 'columns' => ['recipient_id'], 'length' => []],
+ 'idx_26204_fk_software_relationship_relation_type_idx' => ['type' => 'index', 'columns' => ['relationship_id'], 'length' => []],
+ 'idx_26204_fk_software_relationship_software_from' => ['type' => 'index', 'columns' => ['software_id'], 'length' => []],
+ 'idx_26204_fk_software_relationship_to_idx' => ['type' => 'index', 'columns' => ['recipient_id'], 'length' => []],
],
'_constraints' => [
- 'primary' => ['type' => 'primary', 'columns' => ['software_id', 'recipient_id', 'relationship_type_id'], 'length' => []],
- 'fk_software_relationship_relation_type' => ['type' => 'foreign', 'columns' => ['relationship_type_id'], 'references' => ['relationship_types', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_software_relationship_relation_type' => ['type' => 'foreign', 'columns' => ['relationship_id'], 'references' => ['relationships', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_software_relationship_software_from' => ['type' => 'foreign', 'columns' => ['software_id'], 'references' => ['softwares', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_software_relationship_to' => ['type' => 'foreign', 'columns' => ['recipient_id'], 'references' => ['softwares', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
],
];
// @codingStandardsIgnoreEnd
*/
public $records = [
[
+ 'id' => '',
'software_id' => '',
+ 'relationship_id' => '',
'recipient_id' => '',
- 'relationship_type_id' => '',
- 'created' => 1459435671,
- 'modified' => 1459435671
+ 'created' => 1460127698,
+ 'modified' => 1460127698
],
];
}
'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
'username' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
- 'logo_url' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'logo_directory' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'url' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'user_type_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
'description' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
'role' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
'password' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
+ 'email' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'photo' => ['type' => 'text', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'_indexes' => [
- 'idx_17630_fk_users_user_types_idx' => ['type' => 'index', 'columns' => ['user_type_id'], 'length' => []],
+ 'idx_26549_fk_users_user_types_idx' => ['type' => 'index', 'columns' => ['user_type_id'], 'length' => []],
],
'_constraints' => [
- 'primary' => ['type' => 'primary', 'columns' => ['id', 'user_type_id'], 'length' => []],
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
'fk_user_user_type' => ['type' => 'foreign', 'columns' => ['user_type_id'], 'references' => ['user_types', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
],
];
[
'id' => '',
'username' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
- 'created' => 1459435671,
- 'logo_url' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
+ 'created' => 1460132201,
+ 'logo_directory' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'url' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
'user_type_id' => '',
'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
- 'modified' => 1459435671,
+ 'modified' => 1460132201,
'role' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
- 'password' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
+ 'password' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
+ 'email' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
+ 'photo' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.'
],
];
}
*/
// @codingStandardsIgnoreStart
public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
'user_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
'recipient_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
- 'relationship_type_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'relationship_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null],
'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
'_indexes' => [
- 'idx_17637_fk_entities_relationships_entities_idx' => ['type' => 'index', 'columns' => ['user_id'], 'length' => []],
- 'idx_17637_fk_entities_relationships_relationtion_types_idx' => ['type' => 'index', 'columns' => ['relationship_type_id'], 'length' => []],
- 'idx_17637_fk_entities_relationships_users_recipient_idx' => ['type' => 'index', 'columns' => ['recipient_id'], 'length' => []],
+ 'idx_26219_fk_entities_relationships_entities_idx' => ['type' => 'index', 'columns' => ['user_id'], 'length' => []],
+ 'idx_26219_fk_entities_relationships_relationtion_types_idx' => ['type' => 'index', 'columns' => ['relationship_id'], 'length' => []],
+ 'idx_26219_fk_entities_relationships_users_recipient_idx' => ['type' => 'index', 'columns' => ['recipient_id'], 'length' => []],
],
'_constraints' => [
- 'primary' => ['type' => 'primary', 'columns' => ['created'], 'length' => []],
- 'fk_entities_relationships_relationtion_types' => ['type' => 'foreign', 'columns' => ['relationship_type_id'], 'references' => ['relationship_types', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_entities_relationships_relationtion_types' => ['type' => 'foreign', 'columns' => ['relationship_id'], 'references' => ['relationships', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_entities_relationships_users' => ['type' => 'foreign', 'columns' => ['user_id'], 'references' => ['users', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_entities_relationships_users_recipient' => ['type' => 'foreign', 'columns' => ['recipient_id'], 'references' => ['users', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
],
];
// @codingStandardsIgnoreEnd
*/
public $records = [
[
+ 'id' => '',
'user_id' => '',
'recipient_id' => '',
- 'relationship_type_id' => '',
- 'created' => 1459435672,
- 'modified' => 1459435672
+ 'relationship_id' => '',
+ 'created' => 1460127718,
+ 'modified' => 1460127718
],
];
}
--- /dev/null
+<?php
+namespace App\Test\Fixture;
+
+use Cake\TestSuite\Fixture\TestFixture;
+
+/**
+ * UsersRelationshipsSoftwaresFixture
+ *
+ */
+class UsersRelationshipsSoftwaresFixture extends TestFixture
+{
+
+ /**
+ * Fields
+ *
+ * @var array
+ */
+ // @codingStandardsIgnoreStart
+ public $fields = [
+ 'id' => ['type' => 'biginteger', 'length' => 20, 'autoIncrement' => true, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null],
+ 'software_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'user_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'relationship_id' => ['type' => 'biginteger', 'length' => 20, 'default' => null, 'null' => false, 'comment' => null, 'precision' => null, 'unsigned' => null, 'autoIncrement' => null],
+ 'created' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ 'modified' => ['type' => 'timestamp', 'length' => null, 'default' => null, 'null' => true, 'comment' => null, 'precision' => null],
+ '_indexes' => [
+ 'idx_26225_fk_entity_software_relationship_entity_idx' => ['type' => 'index', 'columns' => ['user_id'], 'length' => []],
+ 'idx_26225_fk_entity_software_relationship_relationship_type_idx' => ['type' => 'index', 'columns' => ['relationship_id'], 'length' => []],
+ 'idx_26225_fk_user_software_relationship_software' => ['type' => 'index', 'columns' => ['software_id'], 'length' => []],
+ ],
+ '_constraints' => [
+ 'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
+ 'fk_entity_software_relationship_entity' => ['type' => 'foreign', 'columns' => ['user_id'], 'references' => ['users', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_user_software_relationship_relationship_type' => ['type' => 'foreign', 'columns' => ['relationship_id'], 'references' => ['relationships', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ 'fk_user_software_relationship_software' => ['type' => 'foreign', 'columns' => ['software_id'], 'references' => ['softwares', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
+ ],
+ ];
+ // @codingStandardsIgnoreEnd
+
+ /**
+ * Records
+ *
+ * @var array
+ */
+ public $records = [
+ [
+ 'id' => '',
+ 'software_id' => '',
+ 'user_id' => '',
+ 'relationship_id' => '',
+ 'created' => 1460127719,
+ 'modified' => 1460127719
+ ],
+ ];
+}
*/
public $fixtures = [
'app.relationship_types',
- 'app.softwares_relationships',
+ 'app.relationships',
'app.softwares',
'app.licenses',
'app.licence_types',
+ 'app.reviews',
+ 'app.users',
+ 'app.user_types',
+ 'app.screenshots',
+ 'app.softwares_relationships',
'app.recipients',
'app.users_relationships',
- 'app.users',
- 'app.user_types'
+ 'app.users_relationships_softwares'
];
/**
--- /dev/null
+<?php
+namespace App\Test\TestCase\Controller;
+
+use App\Controller\RelationshipsController;
+use Cake\TestSuite\IntegrationTestCase;
+
+/**
+ * App\Controller\RelationshipsController Test Case
+ */
+class RelationshipsControllerTest extends IntegrationTestCase
+{
+
+ /**
+ * Fixtures
+ *
+ * @var array
+ */
+ public $fixtures = [
+ 'app.relationships',
+ 'app.relationship_types',
+ 'app.softwares',
+ 'app.licenses',
+ 'app.licence_types',
+ 'app.reviews',
+ 'app.users',
+ 'app.user_types',
+ 'app.users_relationships',
+ 'app.users_relationships_softwares',
+ 'app.screenshots',
+ 'app.softwares_relationships'
+ ];
+
+ /**
+ * Test index method
+ *
+ * @return void
+ */
+ public function testIndex()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test view method
+ *
+ * @return void
+ */
+ public function testView()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test add method
+ *
+ * @return void
+ */
+ public function testAdd()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test edit method
+ *
+ * @return void
+ */
+ public function testEdit()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test delete method
+ *
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+}
--- /dev/null
+<?php
+namespace App\Test\TestCase\Controller;
+
+use App\Controller\RelationshipsSoftwaresController;
+use Cake\TestSuite\IntegrationTestCase;
+
+/**
+ * App\Controller\RelationshipsSoftwaresController Test Case
+ */
+class RelationshipsSoftwaresControllerTest extends IntegrationTestCase
+{
+
+ /**
+ * Fixtures
+ *
+ * @var array
+ */
+ public $fixtures = [
+ 'app.relationships_softwares'
+ ];
+
+ /**
+ * Test index method
+ *
+ * @return void
+ */
+ public function testIndex()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test view method
+ *
+ * @return void
+ */
+ public function testView()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test add method
+ *
+ * @return void
+ */
+ public function testAdd()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test edit method
+ *
+ * @return void
+ */
+ public function testEdit()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test delete method
+ *
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+}
--- /dev/null
+<?php
+namespace App\Test\TestCase\Controller;
+
+use App\Controller\RelationshipsSoftwaresUsersController;
+use Cake\TestSuite\IntegrationTestCase;
+
+/**
+ * App\Controller\RelationshipsSoftwaresUsersController Test Case
+ */
+class RelationshipsSoftwaresUsersControllerTest extends IntegrationTestCase
+{
+
+ /**
+ * Fixtures
+ *
+ * @var array
+ */
+ public $fixtures = [
+ 'app.relationships_softwares_users',
+ 'app.softwares',
+ 'app.licenses',
+ 'app.licence_types',
+ 'app.reviews',
+ 'app.users',
+ 'app.user_types',
+ 'app.screenshots',
+ 'app.relationships',
+ 'app.relationship_types',
+ 'app.softwares_relationships',
+ 'app.recipients',
+ 'app.users_relationships',
+ 'app.users_relationships_softwares'
+ ];
+
+ /**
+ * Test index method
+ *
+ * @return void
+ */
+ public function testIndex()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test view method
+ *
+ * @return void
+ */
+ public function testView()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test add method
+ *
+ * @return void
+ */
+ public function testAdd()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test edit method
+ *
+ * @return void
+ */
+ public function testEdit()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test delete method
+ *
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+}
--- /dev/null
+<?php
+namespace App\Test\TestCase\Controller;
+
+use App\Controller\RelationshipsUsersController;
+use Cake\TestSuite\IntegrationTestCase;
+
+/**
+ * App\Controller\RelationshipsUsersController Test Case
+ */
+class RelationshipsUsersControllerTest extends IntegrationTestCase
+{
+
+ /**
+ * Fixtures
+ *
+ * @var array
+ */
+ public $fixtures = [
+ 'app.relationships_users',
+ 'app.users',
+ 'app.user_types',
+ 'app.reviews',
+ 'app.softwares',
+ 'app.licenses',
+ 'app.licence_types',
+ 'app.screenshots',
+ 'app.relationships',
+ 'app.relationship_types',
+ 'app.softwares_relationships',
+ 'app.recipients',
+ 'app.users_relationships',
+ 'app.users_relationships_softwares',
+ 'app.relationships_softwares',
+ 'app.relationships_softwares_users'
+ ];
+
+ /**
+ * Test index method
+ *
+ * @return void
+ */
+ public function testIndex()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test view method
+ *
+ * @return void
+ */
+ public function testView()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test add method
+ *
+ * @return void
+ */
+ public function testAdd()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test edit method
+ *
+ * @return void
+ */
+ public function testEdit()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test delete method
+ *
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+}
*/
public $fixtures = [
'app.users',
- 'app.user_types'
+ 'app.user_types',
+ 'app.reviews',
+ 'app.softwares',
+ 'app.licenses',
+ 'app.licence_types',
+ 'app.screenshots',
+ 'app.relationships',
+ 'app.relationship_types',
+ 'app.softwares_relationships',
+ 'app.recipients',
+ 'app.users_relationships',
+ 'app.users_relationships_softwares',
+ 'app.relationships_users',
+ 'app.relationships_softwares',
+ 'app.relationships_softwares_users'
];
-
- public function setUp()
- {
- parent::setUp();
- $this->Users = TableRegistry::get('Users');
- }
-
/**
* Test index method
*
*/
public function testAdd()
{
- // Définit des données de session
- $this->session([
- 'Auth' => [
- 'User' => [
- 'id' => 9,
- 'username' => 'Mickael',
- 'password' => '8ie9nxz5',
- ]
- ]
- ]);
- $this->get('/articles/add');
-
- $this->assertResponseOk();
-
- $this->post('/users/add', $this->Users);
-
+ $this->markTestIncomplete('Not implemented yet.');
}
/**
'app.users_relationships',
'app.users',
'app.user_types',
- 'app.recipients',
+ 'app.relationships',
'app.relationship_types',
- 'app.softwares_relationships',
'app.softwares',
'app.licenses',
- 'app.licence_types'
+ 'app.licence_types',
+ 'app.reviews',
+ 'app.screenshots',
+ 'app.users_relationships_softwares',
+ 'app.softwares_relationships'
];
/**
--- /dev/null
+<?php
+namespace App\Test\TestCase\Controller;
+
+use App\Controller\UsersRelationshipsSoftwaresController;
+use Cake\TestSuite\IntegrationTestCase;
+
+/**
+ * App\Controller\UsersRelationshipsSoftwaresController Test Case
+ */
+class UsersRelationshipsSoftwaresControllerTest extends IntegrationTestCase
+{
+
+ /**
+ * Fixtures
+ *
+ * @var array
+ */
+ public $fixtures = [
+ 'app.users_relationships_softwares',
+ 'app.softwares',
+ 'app.licenses',
+ 'app.licence_types',
+ 'app.reviews',
+ 'app.users',
+ 'app.user_types',
+ 'app.screenshots',
+ 'app.relationships',
+ 'app.relationship_types',
+ 'app.softwares_relationships',
+ 'app.users_relationships'
+ ];
+
+ /**
+ * Test index method
+ *
+ * @return void
+ */
+ public function testIndex()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test view method
+ *
+ * @return void
+ */
+ public function testView()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test add method
+ *
+ * @return void
+ */
+ public function testAdd()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test edit method
+ *
+ * @return void
+ */
+ public function testEdit()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+
+ /**
+ * Test delete method
+ *
+ * @return void
+ */
+ public function testDelete()
+ {
+ $this->markTestIncomplete('Not implemented yet.');
+ }
+}