Views plugins in Drupal7 and Drupal8. This are the slides from Michael Lenahans session http://drupalcamp.berlin/program/sessions/viewspluginsd7andd8
Creating and breaking a module in Drupal 8.
Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details
Debug your PHP code efficiently without Devel module’s dpm(Drupal Print Message). With Drupal 8’s adoption of Symfony and object-oriented architecture, we need to adjust how we debug our code. Up until now, many of us have been using the convenient dpm function for debugging and introspection. However, dpm cannot print protected properties or provide information about methods of an object.
This makes it difficult to debug objects and classes. It’s time to learn a new approach! We will look at alternative methods to solve this problem such as:
Xdebug with PHPStorm configuration - http://xdebug.org
Devel and the WebProfiler (D8+) Drupal module https://www.drupal.org/project/devel
Using the continuous integration tool Probo CI to speed up the testing and approval process - http://probo.ci/
We will create a module, break it and use the above tools to debug, test and fix the code. Whether you are dipping your toes into object-oriented PHP or you're an advanced developer, everyone can benefit from debugging their code more efficiently.
Creating and breaking a module in Drupal 8.
Configuration Steps: https://www.gitbook.com/book/zivtech/debug-tools-for-drupal8/details
Debug your PHP code efficiently without Devel module’s dpm(Drupal Print Message). With Drupal 8’s adoption of Symfony and object-oriented architecture, we need to adjust how we debug our code. Up until now, many of us have been using the convenient dpm function for debugging and introspection. However, dpm cannot print protected properties or provide information about methods of an object.
This makes it difficult to debug objects and classes. It’s time to learn a new approach! We will look at alternative methods to solve this problem such as:
Xdebug with PHPStorm configuration - http://xdebug.org
Devel and the WebProfiler (D8+) Drupal module https://www.drupal.org/project/devel
Using the continuous integration tool Probo CI to speed up the testing and approval process - http://probo.ci/
We will create a module, break it and use the above tools to debug, test and fix the code. Whether you are dipping your toes into object-oriented PHP or you're an advanced developer, everyone can benefit from debugging their code more efficiently.
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Jake Borr
Managing the increasing complexity of Drupal 8 can be a daunting task for anyone. Do you feel prepared for this new challenge? Today, writing a module involves much more boilerplate code, and there is a lot you need to know in order to get started.
Drupal Console is a suite of tools that runs on a command line interface (CLI) to help you manage that complexity. Join us for this webinar as Jesus Manuel Olivas, Drupal 8 Solutions Engineer at FFW, explores this tool and how it will help you develop faster and smarter. Topics covered will include:
-Drupal Console: the what, the why, and the how
-How to leverage modern PHP practices, introduced into Drupal 8
-The code and files required by a Drupal 8 module and how to generate them
-How to use automated command execution, as well as remote command execution
Talk given on Hoppinger's Drupal deployment automation tool (named Voiture) at the Drupal Tech Talk, 19th May 2011.
Please note the references to all things that 'suck' ... the point was not to complain about the software or issues in question but to raise awareness to the fact that nothing is perfect, that 'good' developers should be critical thinkers and that when you think something 'sucks' it's an opportunity to improve on it somehow :)
Versão com GIFs:
https://docs.google.com/presentation/d/17M-jHlkAP5KPfQ4_Alck_wIsN2gK3dZNGfJR9Bi1L50/present
Códigos para instalação das dependências:
https://github.com/fdaciuk/talks/tree/master/2015/wordcamp-sao-paulo
Behaviour Driven Development con Behat & Drupalsparkfabrik
Il Behaviour Driven Development è una pratica di sviluppo software nella quale i comportamenti della propria applicazione vengono descritti con un linguaggio chiaro e comprensibile a tutti. Grazie a Behat, questi scenari si trasformano in test veri e propri che possono essere eseguiti sulle nostre applicazioni Drupal.
JavaScript dependencies & modules
Introduction to Browserify and how to use CommonJS/Node.js modules in the browser. We'll start with a brief look at the current landscape of handling dependencies and modules.
Talk at sthlm.js 2014-01-07, http://www.meetup.com/sthlm-js/events/156429912/
Demos & code examples; https://github.com/johannilsson/sthlmjs-1401
Webpack is just a module bundler, they said. What they didn't say is why we need it, and what was the motivation that made us achieve what Webpack have been doing for us. In this talk we will navigate through the years of front-end development, ranging from 2003 to nowadays to understand this, and in the end, we will walk thought a complete Webpack project to understand how it works.
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...Scott DeLoach
In this presentation, I demonstrate how you can use jQuery to enhance HTML5 targets. I discuss how MadCap Flare uses jQuery, how to customize MadCap’s plugins, where to find additional plugins, how to customize them, and how to add new plugins to Flare. It also includes real–world examples of HTML5 targets using jQuery plugins.
http://www.clickstart.net
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
Drupal 7 allows to easily build and maintain distributions, i.e. repeatable website templates; you can benefit from this in all cases, whether you aim at large-scale deployments or even at maintaining a single website.
We will show how to package core and contributed modules in a distribution by using a Makefile and a profile and keeping them up-to-date during the whole development cycle.
Then you will learn how to use Code-Driven Development to store all settings in a sustainable way: use the Features module to easily describe configuration in code, a proper separation between Features to make your code reusable and extendible, a well-thought design of Features to create easier development patterns, CTools and Exportables to put your configuration in code even when a module does not support it natively.
Last, we will see how the distributions update mechanism allows you to create a new version of your distribution for easy and painless configuration updates of a live site.
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Jake Borr
Managing the increasing complexity of Drupal 8 can be a daunting task for anyone. Do you feel prepared for this new challenge? Today, writing a module involves much more boilerplate code, and there is a lot you need to know in order to get started.
Drupal Console is a suite of tools that runs on a command line interface (CLI) to help you manage that complexity. Join us for this webinar as Jesus Manuel Olivas, Drupal 8 Solutions Engineer at FFW, explores this tool and how it will help you develop faster and smarter. Topics covered will include:
-Drupal Console: the what, the why, and the how
-How to leverage modern PHP practices, introduced into Drupal 8
-The code and files required by a Drupal 8 module and how to generate them
-How to use automated command execution, as well as remote command execution
Talk given on Hoppinger's Drupal deployment automation tool (named Voiture) at the Drupal Tech Talk, 19th May 2011.
Please note the references to all things that 'suck' ... the point was not to complain about the software or issues in question but to raise awareness to the fact that nothing is perfect, that 'good' developers should be critical thinkers and that when you think something 'sucks' it's an opportunity to improve on it somehow :)
Versão com GIFs:
https://docs.google.com/presentation/d/17M-jHlkAP5KPfQ4_Alck_wIsN2gK3dZNGfJR9Bi1L50/present
Códigos para instalação das dependências:
https://github.com/fdaciuk/talks/tree/master/2015/wordcamp-sao-paulo
Behaviour Driven Development con Behat & Drupalsparkfabrik
Il Behaviour Driven Development è una pratica di sviluppo software nella quale i comportamenti della propria applicazione vengono descritti con un linguaggio chiaro e comprensibile a tutti. Grazie a Behat, questi scenari si trasformano in test veri e propri che possono essere eseguiti sulle nostre applicazioni Drupal.
JavaScript dependencies & modules
Introduction to Browserify and how to use CommonJS/Node.js modules in the browser. We'll start with a brief look at the current landscape of handling dependencies and modules.
Talk at sthlm.js 2014-01-07, http://www.meetup.com/sthlm-js/events/156429912/
Demos & code examples; https://github.com/johannilsson/sthlmjs-1401
Webpack is just a module bundler, they said. What they didn't say is why we need it, and what was the motivation that made us achieve what Webpack have been doing for us. In this talk we will navigate through the years of front-end development, ranging from 2003 to nowadays to understand this, and in the end, we will walk thought a complete Webpack project to understand how it works.
Extending MadCap Flare HTML5 Targets with jQuery - MadWorld 2016, Scott DeLoa...Scott DeLoach
In this presentation, I demonstrate how you can use jQuery to enhance HTML5 targets. I discuss how MadCap Flare uses jQuery, how to customize MadCap’s plugins, where to find additional plugins, how to customize them, and how to add new plugins to Flare. It also includes real–world examples of HTML5 targets using jQuery plugins.
http://www.clickstart.net
Building and Maintaining a Distribution in Drupal 7 with FeaturesNuvole
Drupal 7 allows to easily build and maintain distributions, i.e. repeatable website templates; you can benefit from this in all cases, whether you aim at large-scale deployments or even at maintaining a single website.
We will show how to package core and contributed modules in a distribution by using a Makefile and a profile and keeping them up-to-date during the whole development cycle.
Then you will learn how to use Code-Driven Development to store all settings in a sustainable way: use the Features module to easily describe configuration in code, a proper separation between Features to make your code reusable and extendible, a well-thought design of Features to create easier development patterns, CTools and Exportables to put your configuration in code even when a module does not support it natively.
Last, we will see how the distributions update mechanism allows you to create a new version of your distribution for easy and painless configuration updates of a live site.
This presentation was delivered on 11th May, 2014 in Drupal Camp Pakistan held in DatumSquare IT Services Islamabad. Contents of the presentation contains some basics stuff for designers, themers and coders.
Drupal 8 improvements for developer productivity php symfony and moreAcquia
This was a webinar hosted by Acquia. Ron Northcutt, a solutions architect at Acquia discussed improvements in Drupal 8 that will surely boost productivity for Drupal developers.
Pantheon's Greg Anderson presents on the topic of using Composer with Drupal and Drush. Composer is a dependency manager that has become the de-facto standard for managing the components used in any sort of PHP library or application. Drupal is no exception to this, and in this presentation, Greg showed that the future is already here: it is completely possible to use native Composer functions to manage the modules and themes used in a Drupal site. In this capacity, Composer can take over the functions usually performed with drush make, drush pm-download, and drush pm-update.
Drupal 8 ha llegado con un montón de novedades. Tras poner en producción mi primer proyecto en Drupal 8, presento algunas de las cosas que he aprendido durante el desarrollo y que me han hecho perder tiempo.
Hablo de Render API, Form API, Dependency injection, CMI y algunas otras cosillas de introducción.
Las diapositivas están repletas de código de ejemplo de cada cosa.
Charla impartida en las oficinas de Idealista para el grupo Drupal Madrid en Marzo de 2016.
Composer is the de-facto php dependency management tool of the future. An ever-increasing number of useful open-source libraries are available for easy use via Packagist, the standard repository manager for Composer. As more and more Drupal contrib modules begin to depend on external libraries from Packagist, the motivation to use Composer to manage grows stronger; since Drupal 8 Core, and Drush 7 are now also using Composer to manage dependencies, the best way to ensure that all of the requirements are resolved correctly is to manage everything from a top-level project composer.json file.
This deck examines the different ways that Composer can be used to manage your project code, and how these new practices will influence how you use Drush and deploy code.
Watch the session video: https://www.youtube.com/watch?v=WNS3d_wzZ2Y
Speaker: Andrea Pescettii
Area: Development
Drupal 8 è in arrivo. Il nuovo Configuration Management è valido sotto molti punti di vista, ma non renderà Features del tutto obsoleto.
Any developer who has worked in team will have to face the activity of setting up their local work environment to start contributing to the project. Whether you are working remotely or onsite, this kind of activity is often time consuming due to the personal configurations of your workstation. This "time wasting" is not predictable and even justifiable to the customer, that is the issue. I think the only way to fix that it's to find a reproducible process which takes the same time to be completed, indipendently by the operating system and configurations. This is why, starting from the last project I've been involved in, I started to lay the groundwork to build it using Docker, Config Split, Drupal Console and Drush.
My session is aimed at programmers and project managers looking for a way to bring new developers on board and make them operational in a given time. It will be a good starting point to discuss about that.
Features are very useful for building Drupal profiles (re-usable applications). They provide a way to capture and save in code the customizations that are done to a Drupal site/application. Here I will describe how I use them in B-Translator.
Recently we presented on WordCamp Thessaloniki how we can use WordPress as a Framework. In this presentation you can find some nice ideas on what is a Framework, how WordPress can be used as one and how we can start building custom apps using WordPress. Enjoy!
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
Talk presented at Kubernetes Community Day, New York, May 2024.
Technical summary of Multi-Cluster Kubernetes Networking architectures with focus on 4 key topics.
1) Key patterns for Multi-cluster architectures
2) Architectural comparison of several OSS/ CNCF projects to address these patterns
3) Evolution trends for the APIs of these projects
4) Some design recommendations & guidelines for adopting/ deploying these solutions.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
# Internet Security: Safeguarding Your Digital World
In the contemporary digital age, the internet is a cornerstone of our daily lives. It connects us to vast amounts of information, provides platforms for communication, enables commerce, and offers endless entertainment. However, with these conveniences come significant security challenges. Internet security is essential to protect our digital identities, sensitive data, and overall online experience. This comprehensive guide explores the multifaceted world of internet security, providing insights into its importance, common threats, and effective strategies to safeguard your digital world.
## Understanding Internet Security
Internet security encompasses the measures and protocols used to protect information, devices, and networks from unauthorized access, attacks, and damage. It involves a wide range of practices designed to safeguard data confidentiality, integrity, and availability. Effective internet security is crucial for individuals, businesses, and governments alike, as cyber threats continue to evolve in complexity and scale.
### Key Components of Internet Security
1. **Confidentiality**: Ensuring that information is accessible only to those authorized to access it.
2. **Integrity**: Protecting information from being altered or tampered with by unauthorized parties.
3. **Availability**: Ensuring that authorized users have reliable access to information and resources when needed.
## Common Internet Security Threats
Cyber threats are numerous and constantly evolving. Understanding these threats is the first step in protecting against them. Some of the most common internet security threats include:
### Malware
Malware, or malicious software, is designed to harm, exploit, or otherwise compromise a device, network, or service. Common types of malware include:
- **Viruses**: Programs that attach themselves to legitimate software and replicate, spreading to other programs and files.
- **Worms**: Standalone malware that replicates itself to spread to other computers.
- **Trojan Horses**: Malicious software disguised as legitimate software.
- **Ransomware**: Malware that encrypts a user's files and demands a ransom for the decryption key.
- **Spyware**: Software that secretly monitors and collects user information.
### Phishing
Phishing is a social engineering attack that aims to steal sensitive information such as usernames, passwords, and credit card details. Attackers often masquerade as trusted entities in email or other communication channels, tricking victims into providing their information.
### Man-in-the-Middle (MitM) Attacks
MitM attacks occur when an attacker intercepts and potentially alters communication between two parties without their knowledge. This can lead to the unauthorized acquisition of sensitive information.
### Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS) Attacks
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
1. # Views Plugins in Drupal 7 and Drupal 8
● Michael Lenahan, Developer at erdfisch
● http://drupalcamp.berlin/program/sessions/viewspluginsd7andd8
2. # Key Points
● In D7, views is extensible through plugins
● In D8, all of Drupal is extensible through plugins
● In D7, Views is objectoriented
● In D8, All of Drupal is objectoriented
3. # tutorial and documentation
# Source: http://www.codem0nk3y.com/2012/04/whatbugsmeaboutmodxandwhy/
cmslearningcurve/
4. Drupal 7 setup
# enable views and views_ui
drush en y
views_ui
# enable the frontpage view at:
# admin/structure/views
# set 'Default front page' to 'frontpage' at:
# admin/config/system/siteinformation
# add some content
6. # Drupal 7
# Mummy, where do views plugins come from?
7. # Look in s/a/m/contrib/views/includes/plugins.inc
# All the 'native' views plugins are declared there.
/**
* Implements hook_views_plugins().
*/
function views_views_plugins() {
$plugins = array(
// display, style, row, argument default, argument
validator and access.
● So we will also need to implement hook_views_plugins().
8. # drupal 7
cd sites/all/modules/contrib/views/plugins && ls
9. class views_plugin_access_none extends views_plugin_access
class views_plugin_access_perm extends views_plugin_access
class views_plugin_access_role extends views_plugin_access
10. # using sublime text (ctrl p)
# alternatively, use grep on the command line:
grep rin
'extends views_plugin' .
11. # Look in s/a/m/contrib/views/includes/plugins.inc
# Views declares its own plugins by implementing
hook_views_plugins().
function views_views_plugins() {
$plugins = array(
// display, style, row, argument default, argument
validator and access.
'access' => array(
'none' => array(
'title' => t('None'),
'help' => t('Will be available to all users.'),
'handler' => 'views_plugin_access_none',
'help topic' => 'accessnone',
),
13. # Let's create a D7 custom views access plugin
mkdir p
sites/all/modules/custom/my_views_plugins
cd sites/all/modules/custom/my_views_plugins
# Create a file named my_views_plugins.info:
name = My Views Plugins
description = Some views plugins examples.
core = 7.x
# Create an empty file named my_views_plugins.module.
14. # Enable our empty D7 module by browsing to:
admin/modules
15. # In D7, we need to tell Drupal we are using views.
# Copy the following text into my_views_plugins.module:
<?php
/**
* Implements hook_views_api().
*/
function my_views_plugin_views_api() {
return array(
'api' => '3',
);
}
16. # In D7, we need to implement hook_views_plugins().
# Create the following file:
s/a/m/custom/my_views_plugins/my_views_plugin.views.inc
function my_views_plugin_views_plugins() {
$plugins = array();
// Tip: copy from: sites/all/modules/contrib/views/includes/plugins.inc
$plugins['access'] = array(
'time' => array(
'title' => t('Time'),
'help' => t('Access will be granted according to time of day.'),
'handler' => 'views_plugin_access_time',
),
);
return $plugins;
}
17. # We still need to tell D7 about the .inc file.
# Add the files[] line to my_views_plugin.info:
name = My Views Plugins
description = Some views plugins examples.
core = 7.x
files[] = plugins/views_plugin_access_time.inc
18. # Clear the cache (drush cc views or
admin/config/development/performance)
# Reload: admin/structure/views/view/frontpage/edit
19.
20. # Now write the actual plugin class:
# my_views_plugins/plugins/views_plugin_access_time.inc
class views_plugin_access_time extends
views_plugin_access {
// Override the base class methods.
function access($account) {
return _my_views_plugin_access();
}
function get_access_callback() {
return array('_my_views_plugin_access');
}
21. # my_views_plugin.module
function _my_views_plugin_access() {
$date = new DateTime('now');
$hour = $date>
format('H');
if ($hour > 22) {
// The children are in bed.
return TRUE;
}
return FALSE;
}
23. # Views Plugins in Drupal 8
mkdir p
modules/custom/my_views_plugins
cd modules/custom/my_views_plugins
# Create a file named my_views_plugins.info.yml
name: My Views Plugins
type: module
description: Some views plugins examples.
core: 8.x
# Create an empty my_views_plugins.module file
<?php
24. # Enable our empty D8 module by browsing to:
admin/modules
25. # In Drupal 8, views access plugins are to be found in a
predictable location.
# This means that they can be easily discovered!
core/modules/user/src/Plugin/views/access/Permission.php
core/modules/user/src/Plugin/views/access/Role.php
core/modules/views/src/Plugin/views/access/None.php
● So, let's create the same directory structure …
(cd to your drupal8
root)
mkdir p
modules/custom/my_views_plugins/src/Plugin/views/access
cd modules/custom/my_views_plugins/src/Plugin/views/access
● create a Time.php file here, copy None.php to start
26. # my_views_plugins/src/Plugin/views/access/Time.php
namespace Drupalmy_views_pluginsPluginviewsaccess;
use DrupalCoreSessionAccountInterface;
use SymfonyComponentRoutingRoute;
use DrupalviewsPluginviewsaccessAccessPluginBase;
class Time extends AccessPluginBase {
public function summaryTitle() {}
public function access(AccountInterface $account) {}
public function alterRouteDefinition(Route $route) {}
}
27. # my_views_plugins/src/Plugin/views/access/Time.php
# Implement all the methods of AccessPluginBase
class Time extends AccessPluginBase {
public function summaryTitle() {
return $this>
t('Restricted to a time of day.');
}
public function access(AccountInterface $account) {
return _my_views_plugin_access();
}
public function alterRouteDefinition(Route $route) {
$route>
setRequirement('_custom_access',
'_my_views_plugin_access');
}
}
28. # my_views_plugins/my_views_plugins.module
function _my_views_plugin_access() {
$date = new DateTime('now');
$hour = $date>
format('H');
if ($hour >= 22) {
return DrupalCoreAccessAccessResult::allowed();
}
return DrupalCoreAccessAccessResult::forbidden();
}
30. Thank you!
Further learning:
● Larry Garfield
DrupalCon Amsterdam 2014: Drupal 8: The Crash Course
● Joe Shindelar
DrupalCon Amsterdam 2014: An Overview of the Drupal 8
Plugin System