This document discusses how to create a custom field in Drupal 7. It begins by explaining that fields were moved into core in Drupal 7. It then provides steps to create a custom "Collaborator" field with name, role, and link text components. These steps include creating module files, implementing hook functions to define the schema, widget, and formatter. Custom formatters and validation functions are also demonstrated. Documentation resources for fields are shared.
Drupal is Stupid (But I Love It Anyway)brockboland
Regrettably, my machine didn't cooperate when I tried to record this presentation. I don't think the slides will do you much good without the stuff I said, but a few people asked for them.
---
Depending on who you ask, Drupal is either a framework or a platform, but no matter how you look at it, there are things about it that suck. Hear Brock Boland talk about the pain points of coding for Drupal 6, how things have improved in Drupal 7, and what's expected to be better in Drupal 8.
This session is for those who are excited by the great power of Apache Solr search for Drupal and want to take things even further. Do you want take complete control over your search interface and offer more than the default features? Have you ever wondered what it takes to add data to your search index? Curious about defining facets, custom sorting, or making cool new widgets for filtering and faceting? Join us for a technical deep dive into the world of Solr search.
The general topics of this presentation will overlap with those covered at Drupalcon SF for the Drupal 6 version, but we will focus on use of the API as found in the Drupal 7 version.
Introducing the Solr index
* Learn about Solr fields, and how to map Drupal data onto them
* See how to add data to the search index
* Execute a search in PHP code and use the results
Using the API for custom search paths and interfaces
* How to use the prepare and alter hooks for the query object, and why they differ.
* Make use facing changes, or add filters that are transparent to the user.
Build custom facets based on node fields
* What comes OOTB
* Hooks to add facets for additional field types
Shortcodes are commonplace in WordPress themes, plugins and even WordPress core. Whether you are a new developer looking to implement a shortcode for the first time, or are a seasoned pro; come join us as we delve into the pros, cons, gotchas, best practices and creative approaches to shortcodes.
Have you heard WP-CLI, an about open source WordPress management tool that can make your development flow a lot easier? If you’ve heard about it or already use, you probably wondered how it it be extended to support custom commands. This talk will give you a short overview how to accomplish this and make your own magic with WP-CLI.
Everything you always wanted to know about forms* *but were afraid to askAndrea Giuliano
La componente dei Form di Symfony2 rende possibile la costruzione di diverse tipologie di form in modo del tutto semplice. La sua architettura flessibile e altamente scalabile permette di poter gestire strutture adatte ad ogni tipo di esigenza. Tuttavia, conoscere come utilizzare appieno tutta la sua potenza non è banale. In questo talk verrà trattato in profondità la componente Form di Symfony2, mostrando i suoi meccanismi di base e come utilizzarli per estenderli ed introdurre la propria logica di business, così da costruire form cuciti a misura delle tue necessità.
This session will introduce you to the new Form component in Symfony2. With the new domain-driven paradigma and its flexible design, the component opens a door to a wide range of possibilities. The brand new architecture makes creating complex forms easier and faster than ever before. This talk will teach you today what you need to know to build powerful forms tomorrow.
Dig Deeper into WordPress - WD Meetup CairoMohamed Mosaad
Dig deeper into WordPress is a presentation made for Web Designers Meetup in Cairo taken place on 17th Dec 2012.
Signup at WPMonkeys.com to get notified when awesome new WordPress related content is published.
Your code sucks, let's fix it - PHP Master Series 2012Rafael Dohms
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Your code sucks, let's fix it (CakeFest2012)Rafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
Drupal is Stupid (But I Love It Anyway)brockboland
Regrettably, my machine didn't cooperate when I tried to record this presentation. I don't think the slides will do you much good without the stuff I said, but a few people asked for them.
---
Depending on who you ask, Drupal is either a framework or a platform, but no matter how you look at it, there are things about it that suck. Hear Brock Boland talk about the pain points of coding for Drupal 6, how things have improved in Drupal 7, and what's expected to be better in Drupal 8.
This session is for those who are excited by the great power of Apache Solr search for Drupal and want to take things even further. Do you want take complete control over your search interface and offer more than the default features? Have you ever wondered what it takes to add data to your search index? Curious about defining facets, custom sorting, or making cool new widgets for filtering and faceting? Join us for a technical deep dive into the world of Solr search.
The general topics of this presentation will overlap with those covered at Drupalcon SF for the Drupal 6 version, but we will focus on use of the API as found in the Drupal 7 version.
Introducing the Solr index
* Learn about Solr fields, and how to map Drupal data onto them
* See how to add data to the search index
* Execute a search in PHP code and use the results
Using the API for custom search paths and interfaces
* How to use the prepare and alter hooks for the query object, and why they differ.
* Make use facing changes, or add filters that are transparent to the user.
Build custom facets based on node fields
* What comes OOTB
* Hooks to add facets for additional field types
Shortcodes are commonplace in WordPress themes, plugins and even WordPress core. Whether you are a new developer looking to implement a shortcode for the first time, or are a seasoned pro; come join us as we delve into the pros, cons, gotchas, best practices and creative approaches to shortcodes.
Have you heard WP-CLI, an about open source WordPress management tool that can make your development flow a lot easier? If you’ve heard about it or already use, you probably wondered how it it be extended to support custom commands. This talk will give you a short overview how to accomplish this and make your own magic with WP-CLI.
Everything you always wanted to know about forms* *but were afraid to askAndrea Giuliano
La componente dei Form di Symfony2 rende possibile la costruzione di diverse tipologie di form in modo del tutto semplice. La sua architettura flessibile e altamente scalabile permette di poter gestire strutture adatte ad ogni tipo di esigenza. Tuttavia, conoscere come utilizzare appieno tutta la sua potenza non è banale. In questo talk verrà trattato in profondità la componente Form di Symfony2, mostrando i suoi meccanismi di base e come utilizzarli per estenderli ed introdurre la propria logica di business, così da costruire form cuciti a misura delle tue necessità.
This session will introduce you to the new Form component in Symfony2. With the new domain-driven paradigma and its flexible design, the component opens a door to a wide range of possibilities. The brand new architecture makes creating complex forms easier and faster than ever before. This talk will teach you today what you need to know to build powerful forms tomorrow.
Dig Deeper into WordPress - WD Meetup CairoMohamed Mosaad
Dig deeper into WordPress is a presentation made for Web Designers Meetup in Cairo taken place on 17th Dec 2012.
Signup at WPMonkeys.com to get notified when awesome new WordPress related content is published.
Your code sucks, let's fix it - PHP Master Series 2012Rafael Dohms
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Your code sucks, let's fix it (CakeFest2012)Rafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
Session imparted at DrupalSummer in Barcelona on 2017 July about Drupal 8 Form API. Slides are here too: http://slides.com/estoyausente/d8-form-api-1#/
n 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Raven developer Jeremy Kendall discusses PHP's Slim micro framework, with code examples from a photography website he built to learn it, also using Twig templating and Composer dependency management.
Go beyond the documentation and explore some of what's possible if you stretch symfony to its limits. We will look at a number of aspects of symfony 1.4 and Doctrine 1.2 and tease out some powerful functionality you may not have expected to find, but will doubtless be able to use. Topics covered will include routing, forms, the config cache and record listeners. If you're comfortable in symfony and wondering what's next, this session is for you.
Similar to Fields in Core: How to create a custom field (20)
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
5. WHAT’S NEW IN DRUPAL 7
• InDrupal 6 we used the
CCK module to add fields
into nodes
6. WHAT’S NEW IN DRUPAL 7
• In
Drupal 7 a lot of CCK’s functionality has been moved into
core
• Not all CCK modules made it into core
7. WHAT’S NEW IN DRUPAL 7
• “Node reference” and “User reference” moved to http://
drupal.org/project/references
• “Fieldset” moved to http://drupal.org/project/field_group
• “Contentpermission” moved to http://drupal.org/project/
field_permissions
8. WHAT’S NEW IN DRUPAL 7
• Drupal 7 ships with text, options, number and list
• File and image field all in core
18. HOW TO CREATE A FIELD
• Createa custom
“Collaborators” field
• Module will be called
“collabfield”
• Unlimited value field with a
Name, Role and Link text
fields within
19. HOW TO CREATE A FIELD
• Createa module called
collabfield
• Createcollabfield.info,
collabfield.install and
collabfield.module files
20. HOW TO CREATE A FIELD
collabfield.info
; $Id$
name = Collaborator field
description = Custom collaborator field.
dependencies[] = field_ui
core = 7.x
21. HOW TO CREATE A FIELD
collabfield.install
<?php
// $Id$
/**
* Implements hook_install().
*/
function collabfield_install() {
}
/**
* Implements hook_uninstall().
*/
function collabfield_uninstall() {
}
23. HOW TO CREATE A FIELD
collabfield.module
<?php
// $Id$
/**
* Implementation of hook_field_info().
*/
function collabfield_field_info() {
return array(
'collabfield' => array(
'label' => t('Collaborator'),
'description' => t('Custom collaborators field.'),
'default_widget' => 'collabfield_collabfield_form',
'default_formatter' => 'collabfield_default',
),
);
}
24. HOW TO CREATE A FIELD
collabfield.module
/**
* Implementation of hook_field_is_empty().
*/
function collabfield_field_is_empty($item, $field) {
if ($field['type'] == 'collabfield') {
if (empty($item['name']) && empty($item['role']) && empty($item['link'])) {
return TRUE;
}
}
return FALSE;
}
25. HOW TO CREATE A FIELD
• Create a widget
• Use hook_field_widget_info
to setup field
• Use
hook_field_widget_form for
the actual form element
26. HOW TO CREATE A FIELD
/**
* Implements hook_field_widget_info().
*/
function collabfield_field_widget_info() {
return array(
'collabfield_collabfield_form' => array(
'label' => t('Collabfield form'),
'field types' => array('collabfield'),
'behaviors' => array(
'multiple values' => FIELD_BEHAVIOR_DEFAULT,
//Use FIELD_BEHAVIOR_NONE for no default value.
'default value' => FIELD_BEHAVIOR_DEFAULT,
),
),
);
}
28. HOW TO CREATE A FIELD
• To validate an element add #element_validate to the specific
element
$element['link'] = array(
'#type' => 'textfield',
'#title' => t('Link'),
'#default_value' => isset($items[$delta]['link']) ? $items[$delta]['link'] : NULL,
'#element_validate' => array('_collabfield_link_validate'),
);
/**
* Validation callback for a collabfield link element.
*/
function _collabfield_link_validate($element, &$form_state, $form) {
$value = $element['#value'];
if (!empty($value) && !valid_url($value, TRUE)) {
form_error($element, t('Invalid URL.'));
}
}
29. HOW TO CREATE A FIELD
• Drupalships with three form element validators in
field.module
• _element_validate_integer()
• _element_validate_integer_positive()
• _element_validate_number()
30. HOW TO CREATE A FIELD
• Create a formatter
• Use
hook_field_formatter_info
to setup a formatter
• Use
hook_field_formatter_view
for the actual formatter
31. HOW TO CREATE A FIELD
/**
* Implements hook_field_formatter_info().
*/
function collabfield_field_formatter_info() {
return array(
'collabfield_default' => array(
'label' => t('Default'),
'field types' => array('collabfield'),
),
);
}
32. HOW TO CREATE A FIELD
/**
* Implements hook_field_formatter_view().
*/
function collabfield_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$element = array();
switch ($display['type']) {
case 'collabfield_default':
foreach ($items as $delta => $item) {
$element[$delta]['#markup'] = theme('collabfield_formatter_default', $item);
}
break;
}
return $element;
}
34. CUSTOM FORMATTERS
• Formatter to change default term reference link formatter
• Create as custom module
• Change URL taxonomy/term/[tid] to whatever/[tid]