feat: add missing KF6 framework recipes

This commit is contained in:
2026-05-07 07:53:26 +01:00
parent d8d498f831
commit a69f479b52
2374 changed files with 2610246 additions and 0 deletions
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.cfml</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (ColdFusion) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#898887">&lt;!--- ColdFusion Sample File ---></span>
<span style="color:#898887">&lt;!--- Source: https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/using-arrays-and-structures/structure-examples.html ---></span>
<span style="font-weight:bold">&lt;head></span>
<span style="font-weight:bold">&lt;title></span>Add New Employees<span style="font-weight:bold">&lt;/title></span>
<span style="font-weight:bold">&lt;/head></span>
<span style="font-weight:bold">&lt;body></span>
<span style="font-weight:bold">&lt;h1></span>Add New Employees<span style="font-weight:bold">&lt;/h1></span>
<span style="color:#898887">&lt;!--- Action page code for the form at the bottom of this page. ---></span>
<span style="color:#898887">&lt;!--- Establish parameters for first time through ---></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfparam</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"Form.firstname"</span><span style="color:#006e28"> default</span>=<span style="color:#bf0303">""</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfparam</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"Form.lastname"</span><span style="color:#006e28"> default</span>=<span style="color:#bf0303">""</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfparam</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"Form.email"</span><span style="color:#006e28"> default</span>=<span style="color:#bf0303">""</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfparam</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"Form.phone"</span><span style="color:#006e28"> default</span>=<span style="color:#bf0303">""</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfparam</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"Form.department"</span><span style="color:#006e28"> default</span>=<span style="color:#bf0303">""</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#898887">&lt;!--- If at least the firstname form field is passed, create</span>
<span style="color:#898887">a structure named employee and add values. ---></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfif #Form.firstname# eq </span><span style="color:#bf0303">""</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="font-weight:bold">&lt;p></span>Please fill out the form.<span style="font-weight:bold">&lt;/p></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfelse></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfoutput></span>
<span style="color:#bf0303;font-weight:bold">&lt;cfscript></span>
employee<span style="font-weight:bold">=</span><span style="color:#644a9b;font-weight:bold">StructNew</span><span style="font-weight:bold">()</span>;
employee.firstname <span style="font-weight:bold">=</span> Form.firstname;
employee.lastname <span style="font-weight:bold">=</span> Form.lastname;
employee.email <span style="font-weight:bold">=</span> Form.email;
employee.phone <span style="font-weight:bold">=</span> Form.phone;
employee.department <span style="font-weight:bold">=</span> Form.department;
<span style="color:#bf0303;font-weight:bold">&lt;/cfscript></span>
<span style="color:#898887">&lt;!--- Display results of creating the structure. ---></span>
First name is #StructFind(employee, "firstname")#<span style="font-weight:bold">&lt;br></span>
Last name is #StructFind(employee, "lastname")#<span style="font-weight:bold">&lt;br></span>
EMail is #StructFind(employee, "email")#<span style="font-weight:bold">&lt;br></span>
Phone is #StructFind(employee, "phone")#<span style="font-weight:bold">&lt;br></span>
Department is #StructFind(employee, "department")#<span style="font-weight:bold">&lt;br></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cfoutput></span>
<span style="color:#898887">&lt;!--- Call the custom tag that adds employees. ---></span>
<span style="color:#0057ae;font-weight:bold">&lt;cf_addemployee</span><span style="color:#006e28"> empinfo</span>=<span style="color:#bf0303">"#employee#"</span><span style="color:#0057ae;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cfif></span>
<span style="color:#898887">&lt;!--- The form for adding the new employee information ---></span>
<span style="font-weight:bold">&lt;hr></span>
<span style="font-weight:bold">&lt;form</span><span style="color:#006e28"> action</span>=<span style="color:#bf0303">"newemployee.cfm"</span><span style="color:#006e28"> method</span>=<span style="color:#bf0303">"Post"</span><span style="font-weight:bold">></span>
First Name:<span style="color:#b08000">&amp;nbsp;</span>
<span style="font-weight:bold">&lt;input</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"firstname"</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"text"</span><span style="color:#006e28"> hspace</span>=<span style="color:#bf0303">"30"</span><span style="color:#006e28"> maxlength</span>=<span style="color:#bf0303">"30"</span><span style="font-weight:bold">>&lt;br></span>
Last Name:<span style="color:#b08000">&amp;nbsp;</span>
<span style="font-weight:bold">&lt;input</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"lastname"</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"text"</span><span style="color:#006e28"> hspace</span>=<span style="color:#bf0303">"30"</span><span style="color:#006e28"> maxlength</span>=<span style="color:#bf0303">"30"</span><span style="font-weight:bold">>&lt;br></span>
EMail:<span style="color:#b08000">&amp;nbsp;</span>
<span style="font-weight:bold">&lt;input</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"email"</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"text"</span><span style="color:#006e28"> hspace</span>=<span style="color:#bf0303">"30"</span><span style="color:#006e28"> maxlength</span>=<span style="color:#bf0303">"30"</span><span style="font-weight:bold">>&lt;br></span>
Phone:<span style="color:#b08000">&amp;nbsp;</span>
<span style="font-weight:bold">&lt;input</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"phone"</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"text"</span><span style="color:#006e28"> hspace</span>=<span style="color:#bf0303">"20"</span><span style="color:#006e28"> maxlength</span>=<span style="color:#bf0303">"20"</span><span style="font-weight:bold">>&lt;br></span>
Department:<span style="color:#b08000">&amp;nbsp;</span>
<span style="font-weight:bold">&lt;input</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"department"</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"text"</span><span style="color:#006e28"> hspace</span>=<span style="color:#bf0303">"30"</span><span style="color:#006e28"> maxlength</span>=<span style="color:#bf0303">"30"</span><span style="font-weight:bold">>&lt;br></span>
<span style="font-weight:bold">&lt;input</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"Submit"</span><span style="color:#006e28"> value</span>=<span style="color:#bf0303">"OK"</span><span style="font-weight:bold">></span>
<span style="font-weight:bold">&lt;/form></span>
<span style="font-weight:bold">&lt;br></span>
<span style="font-weight:bold">&lt;/body></span>
<span style="font-weight:bold">&lt;/html></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfoutput></span>
Error. No employee data was passed.<span style="font-weight:bold">&lt;br></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cfoutput></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfexit</span><span style="color:#006e28"> method</span>=<span style="color:#bf0303">"ExitTag"</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfelse></span>
<span style="color:#898887">&lt;!--- Add the employee ---></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfquery</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"AddEmployee"</span><span style="color:#006e28"> datasource</span>=<span style="color:#bf0303">"cfdocexamples"</span><span style="color:#644a9b;font-weight:bold">></span>
INSERT INTO Employees
(FirstName, LastName, Email, Phone, Department)
VALUES (
'#attributes.empinfo.firstname#' ,
'#attributes.empinfo.lastname#' ,
'#attributes.empinfo.email#' ,
'#attributes.empinfo.phone#' ,
'#attributes.empinfo.department#' )
<span style="color:#644a9b;font-weight:bold">&lt;/cfquery></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cfif></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfoutput></span>
<span style="font-weight:bold">&lt;hr></span>Employee Add Complete
<span style="color:#644a9b;font-weight:bold">&lt;/cfoutput></span>
<span style="color:#898887">&lt;!--- temperature.cfc ---></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfcomponent></span>
<span style="color:#644a9b;font-weight:bold">&lt;cffunction</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"FtoC"</span><span style="color:#006e28"> access</span>=<span style="color:#bf0303">"public"</span><span style="color:#006e28"> returntype</span>=<span style="color:#bf0303">"numeric"</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfargument</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"fahrenheit"</span><span style="color:#006e28"> required</span>=<span style="color:#bf0303">"yes"</span><span style="color:#006e28"> type</span>=<span style="color:#bf0303">"numeric"</span><span style="color:#644a9b;font-weight:bold"> /></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfset</span><span style="color:#006e28"> answer</span>=<span style="color:#644a9b;font-weight:bold"> (fahrenheit - 32)*100/180 /></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfreturn answer /></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cffunction></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cfcomponent></span>
<span style="color:#898887">&lt;!--- test.cfm ---></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfset</span><span style="color:#006e28"> fDegrees</span><span style="color:#644a9b;font-weight:bold"> </span>=<span style="color:#644a9b;font-weight:bold"> 212 /></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfinvoke</span><span style="color:#006e28"> component</span>=<span style="color:#bf0303">"temperature"</span><span style="color:#006e28"> method</span>=<span style="color:#bf0303">"FtoC"</span><span style="color:#006e28"> returnvariable</span>=<span style="color:#bf0303">"result"</span><span style="color:#644a9b;font-weight:bold">></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfinvokeargument</span><span style="color:#006e28"> name</span>=<span style="color:#bf0303">"fahrenheit"</span><span style="color:#006e28"> value</span>=<span style="color:#bf0303">"#fDegrees#"</span><span style="color:#644a9b;font-weight:bold"> /></span>
<span style="color:#644a9b;font-weight:bold">&lt;/cfinvoke></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfoutput></span>#fDegrees#<span style="color:#b08000">&amp;deg;</span>F = #result#<span style="color:#b08000">&amp;deg;</span>C<span style="color:#644a9b;font-weight:bold">&lt;/cfoutput></span> <span style="font-weight:bold">&lt;br /></span>
<span style="color:#644a9b;font-weight:bold">&lt;cfset</span><span style="color:#006e28"> person</span><span style="color:#644a9b;font-weight:bold"> </span>=<span style="color:#644a9b;font-weight:bold"> CreateObject(</span><span style="color:#bf0303">"component"</span><span style="color:#644a9b;font-weight:bold">, </span><span style="color:#bf0303">"Person"</span><span style="color:#644a9b;font-weight:bold">) /></span>
</pre></body></html>