Commit 11cde100 authored by NickWilde's avatar NickWilde

Issue #2999976 by NickWilde: Follow/enforce PHP code standards

parent ca97b9ea
/.idea/
/core/
/modules/
/vendor/
# COLORBOX INLINE
## CONTENTS OF THIS FILE
* [Introduction](#introduction)
* [Requirements](#requirements)
* [Recommended Modules](#recommendedsimilar-modules)
* [Installation](#installation)
* [Configuration](#configuration)
* [Maintainers](#maintainers)
## INTRODUCTION
Colorbox Inline allows the user to open content already on the page within a
colorbox.
## REQUIREMENTS
Requires the following modules:
* [Colorbox](https://drupal.org/project/colorbox)
## RECOMMENDED/SIMILAR MODULES
* [colorbox_load](https://www.drupal.org/project/colorbox_load): To load
content via AJAX.
## INSTALLATION
Install as you would normally install a contributed Drupal module. See also the
[Core Docs](https://www.drupal.org/docs/8/extending-drupal-8/installing-modules)
## CONFIGURATION
To create an element which opens the colorbox on select:
Add the attribute `data-colorbox-inline` to an element and make its value a
selector for the content you wish to open.
Eg, `<a data-colorbox-inline=".user-login">User Login</a>`.
Optional extra configuration you can add:
* `data-width` and `data-height` to the anchor to control the size of the
modal window.
* `data-class` to add a class to the colorbox wrapper.
* `data-rel="[galleryid]` to add next/previous options to the colorboxes.
## MAINTAINERS
Current maintainers:
* [Sam Becker (Sam152)](https://www.drupal.org/user/1485048)
* [Renato Gonçalves (RenatoG)](https://www.drupal.org/user/3326031)
* [Nick Wilde (NickWilde)](https://www.drupal.org/u/nickwilde)
Supporting maintenance and support provided by:
* [PreviousNext](https://www.drupal.org/previousnext)
* [CI&T](https://www.drupal.org/cit)
CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Recommended Modules
* Installation
* Configuration
* Maintainers
INTRODUCTION
------------
Colorbox Inline allows the user to open content already on the page within a
colorbox.
REQUIREMENTS
------------
Requires the following modules:
* Colorbox (https://drupal.org/project/colorbox)
RECOMMENDED MODULES
-------------------
To load content via AJAX, use:
* colorbox_load - https://www.drupal.org/project/colorbox_load
INSTALLATION
------------
Install the Colorbox Inline module as you would normally install a contributed Drupal module.
Visit https://www.drupal.org/node/1897420 for further information.
CONFIGURATION
-------------
To create an element which opens the colorbox on select:
Add the attribute data-colorbox-inline to an element and make its value a
selector for the content you wish to open.
Eg, <a data-colorbox-inline=".user-login">User Login</a>.
Optional extra configuration you can add:
- `data-width` and `data-height` to the anchor to control the size of the
modal window.
- `data-class` to add a class to the colorbox wrapper.
- `data-rel="[galleryid]` to add a next/previous options to the opened colorboxes.
MAINTAINERS
-----------
Current maintainers:
* Sam Becker (Sam152) - https://www.drupal.org/user/1485048
* Renato Gonçalves (RenatoG) - https://www.drupal.org/user/3326031
* Nick Wilde (NickWilde) - https://www.drupal.org/u/nickwilde
Supporting maintenance and support provided by:
* PreviousNext - https://www.drupal.org/previousnext
* CI&T - https://www.drupal.org/cit
<?php
use Drupal\Core\Routing\RouteMatchInterface;
/**
* @file
* Enabled the "colorbox inline" functionality for Drupal 8.
* Enable the "colorbox inline" functionality for Drupal 8.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_page_attachments().
*/
......@@ -16,16 +16,15 @@ function colorbox_inline_page_attachments(array &$page) {
}
/**
* Implements hook_help().
*/
* Implements hook_help().
*/
function colorbox_inline_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.colorbox_inline':
return t('<p>The Colorbox Inline module allows you to open content already on the page within a colorbox.</p>
<p>See the <a href=":project_page">project page on Drupal.org</a> for more details.</p>',
[
':project_page' => 'https://www.drupal.org/project/colorbox_inline',
]);
}
switch ($route_name) {
case 'help.page.colorbox_inline':
return t('<p>The Colorbox Inline module allows you to open content already on the page within a colorbox.</p>
<p>See the <a href=":project_page">project page on Drupal.org</a> for more details.</p>',
[
':project_page' => 'https://www.drupal.org/project/colorbox_inline',
]);
}
}
{
"name": "drupal/colorbox_inline",
"require": {
"drupal/colorbox": "^1.4",
"drupal/core": "^8.0"
},
"authors": [
{
"name": "NickWilde",
"homepage": "https://www.drupal.org/user/3094661"
},
{
"name": "RenatoG",
"homepage": "https://www.drupal.org/user/3326031"
},
{
"name": "Sam152",
"homepage": "https://www.drupal.org/user/1485048"
}
],
"description": "Enable \"colorbox inline\" functionality for Drupal 8.",
"homepage": "https://www.drupal.org/project/colorbox_inline",
"support": {
"issues": "https://www.drupal.org/project/issues/colorbox_inline",
"source": "http://cgit.drupalcode.org/colorbox_inline"
}
}
{
"name": "drupal/colorbox_inline",
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"drupal/colorbox": "^1.4",
"drupal/core": "^8.0"
},
"require-dev": {
"php-composter/php-composter": "^0.3.3",
"nickwilde1990/php-composter-phpcs-drupal": "^1.0",
"squizlabs/php_codesniffer": "2.9.x-dev@dev"
},
"authors": [
{
"name": "NickWilde",
"homepage": "https://www.drupal.org/user/3094661"
},
{
"name": "RenatoG",
"homepage": "https://www.drupal.org/user/3326031"
},
{
"name": "Sam152",
"homepage": "https://www.drupal.org/user/1485048"
}
],
"description": "Enable \"colorbox inline\" functionality for Drupal 8.",
"homepage": "https://www.drupal.org/project/colorbox_inline",
"support": {
"issues": "https://www.drupal.org/project/issues/colorbox_inline",
"source": "http://cgit.drupalcode.org/colorbox_inline"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment