Skip to content

Commit

Permalink
Normalized location of views.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-KM committed Jun 11, 2017
1 parent 446baf6 commit 9e8acc2
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace IiifServer;

use IiifServer\Form\ConfigForm;
use IiifServer\Form\Config as ConfigForm;
use Omeka\Module\AbstractModule;
use Omeka\Module\Exception\ModuleCannotInstallException;
use Omeka\Mvc\Controller\Plugin\Messenger;
Expand Down Expand Up @@ -250,7 +250,7 @@ public function getConfigForm(PhpRenderer $renderer)
// In this form, fieldsets are only used for the view.
$vars = [];
$vars['form'] = $form;
return $renderer->render('admin/iiif-server/config-form.phtml', $vars);
return $renderer->render('iiif-server/module/config.phtml', $vars);
}

public function handleConfigForm(AbstractController $controller)
Expand Down
54 changes: 28 additions & 26 deletions config/module.config.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
<?php
namespace IiifServer;

return [
'controllers' => [
'invokables' => [
'IiifServer\Controller\Presentation' => 'IiifServer\Controller\PresentationController',
'IiifServer\Controller\Presentation' => Controller\PresentationController::class,
],
'factories' => [
'IiifServer\Controller\Image' => 'IiifServer\Service\Controller\ImageControllerFactory',
'IiifServer\Controller\Media' => 'IiifServer\Service\Controller\MediaControllerFactory',
'IiifServer\Controller\Image' => Service\Controller\ImageControllerFactory::class,
'IiifServer\Controller\Media' => Service\Controller\MediaControllerFactory::class,
],
],
'controller_plugins' => [
'invokables' => [
'jsonLd' => 'IiifServer\Mvc\Controller\Plugin\JsonLd',
'tileBuilder' => 'IiifServer\Mvc\Controller\Plugin\TileBuilder',
'tileInfo' => 'IiifServer\Mvc\Controller\Plugin\TileInfo',
'tileServer' => 'IiifServer\Mvc\Controller\Plugin\TileServer',
'jsonLd' => Mvc\Controller\Plugin\JsonLd::class,
'tileBuilder' => Mvc\Controller\Plugin\TileBuilder::class,
'tileInfo' => Mvc\Controller\Plugin\TileInfo::class,
'tileServer' => Mvc\Controller\Plugin\TileServer::class,
],
],
'form_elements' => [
'factories' => [
'IiifServer\Form\ConfigForm' => 'IiifServer\Service\Form\ConfigFormFactory',
'IiifServer\Form\Config' => Service\Form\ConfigFactory::class,
],
],
'media_ingesters' => [
'factories' => [
'tile' => 'IiifServer\Service\MediaIngester\TileFactory',
'tile' => Service\MediaIngester\TileFactory::class,
],
],
'media_renderers' => [
'factories' => [
'tile' => 'IiifServer\Service\MediaRenderer\TileFactory',
'tile' => Service\MediaRenderer\TileFactory::class,
],
],
'view_manager' => [
'template_path_stack' => [
OMEKA_PATH . '/modules/IiifServer/view',
],
],
'view_helpers' => [
'invokables' => [
'iiifCollection' => View\Helper\IiifCollection::class,
'iiifCollectionList' => View\Helper\IiifCollectionList::class,
'iiifForceHttpsIfRequired' => View\Helper\IiifForceHttpsIfRequired::class,
],
'factories' => [
'iiifInfo' => Service\ViewHelper\IiifInfoFactory::class,
'iiifManifest' => Service\ViewHelper\IiifManifestFactory::class,
],
],
'router' => [
Expand Down Expand Up @@ -311,22 +329,6 @@
// ],
],
],
'view_manager' => [
'template_path_stack' => [
OMEKA_PATH . '/modules/IiifServer/view',
],
],
'view_helpers' => [
'invokables' => [
'iiifCollection' => 'IiifServer\View\Helper\IiifCollection',
'iiifCollectionList' => 'IiifServer\View\Helper\IiifCollectionList',
'iiifForceHttpsIfRequired' => 'IiifServer\View\Helper\IiifForceHttpsIfRequired',
],
'factories' => [
'iiifInfo' => 'IiifServer\Service\ViewHelper\IiifInfoFactory',
'iiifManifest' => 'IiifServer\Service\ViewHelper\IiifManifestFactory',
],
],
'translator' => [
'translation_file_patterns' => [
[
Expand Down
2 changes: 1 addition & 1 deletion src/Form/ConfigForm.php → src/Form/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Omeka\Settings\Settings;
use Zend\Form\Form;

class ConfigForm extends Form
class Config extends Form
{
protected $api;
protected $settings;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php
namespace IiifServer\Service\Form;

use IiifServer\Form\ConfigForm;
use IiifServer\Form\Config;
use Zend\ServiceManager\Factory\FactoryInterface;
use Interop\Container\ContainerInterface;

class ConfigFormFactory implements FactoryInterface
class ConfigFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$settings = $container->get('Omeka\Settings');
$api = $container->get('Omeka\ApiManager');

$form = new ConfigForm;
$form = new Config;
$form->setSettings($settings);
$form->setApi($api);
return $form;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9e8acc2

Please sign in to comment.