| 1 | # ----------------------------------------------------------------------------- | ||||||||||
| 2 | |||||||||||
| 3 | =encoding utf8 | ||||||||||
| 4 | |||||||||||
| 5 | =head1 NAME | ||||||||||
| 6 | |||||||||||
| 7 | Quiq::ContentProcessor::BaseType - Gemeinsame Funktionalität aller Entitäten (abstrakte Basisklasse) | ||||||||||
| 8 | |||||||||||
| 9 | =head1 BASE CLASSES | ||||||||||
| 10 | |||||||||||
| 11 | =over 2 | ||||||||||
| 12 | |||||||||||
| 13 | =item * | ||||||||||
| 14 | |||||||||||
| 15 | L<Quiq::Section::Object> | ||||||||||
| 16 | |||||||||||
| 17 | =item * | ||||||||||
| 18 | |||||||||||
| 19 | L<Quiq::ClassConfig> | ||||||||||
| 20 | |||||||||||
| 21 | =back | ||||||||||
| 22 | |||||||||||
| 23 | =head1 DESCRIPTION | ||||||||||
| 24 | |||||||||||
| 25 | Diese abstrakte Basisklasse enthält die gemeinsame Funktionalität | ||||||||||
| 26 | ihrer Subklassen. | ||||||||||
| 27 | |||||||||||
| 28 | =cut | ||||||||||
| 29 | |||||||||||
| 30 | # ----------------------------------------------------------------------------- | ||||||||||
| 31 | |||||||||||
| 32 | package Quiq::ContentProcessor::BaseType; | ||||||||||
| 33 | 3 | ▶ | use base qw/Quiq::Section::Object Quiq::ClassConfig/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 34 | |||||||||||
| 35 | 3 | ▶ | use v5.10; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 36 | 3 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 37 | 3 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 38 | |||||||||||
| 39 | 3 | our $VERSION = '1.240'; | |||||||||
| 40 | |||||||||||
| 41 | # ----------------------------------------------------------------------------- | ||||||||||
| 42 | |||||||||||
| 43 | =head1 METHODS | ||||||||||
| 44 | |||||||||||
| 45 | =head2 Eigenschaften | ||||||||||
| 46 | |||||||||||
| 47 | =head3 attributes() - Liste der zulässigen Abschnitts-Attribute | ||||||||||
| 48 | |||||||||||
| 49 | =head4 Synopsis | ||||||||||
| 50 | |||||||||||
| 51 | @attributes | $attributeA = $class->attributes; | ||||||||||
| 52 | |||||||||||
| 53 | =head4 Returns | ||||||||||
| 54 | |||||||||||
| 55 | Liste der Namen der Abschnitts-Attribute. Im Skalar-Kontext wird | ||||||||||
| 56 | eine Referenz auf die Liste geliefert. | ||||||||||
| 57 | |||||||||||
| 58 | =head4 Description | ||||||||||
| 59 | |||||||||||
| 60 | Ermittele die Liste der Namen der zulässigen Abschnitts-Attribute | ||||||||||
| 61 | entlang der Klassenhierarchie und liefere diese zurück. Die | ||||||||||
| 62 | Liste ist alphabetisch sortiert. | ||||||||||
| 63 | |||||||||||
| 64 | =cut | ||||||||||
| 65 | |||||||||||
| 66 | # ----------------------------------------------------------------------------- | ||||||||||
| 67 | |||||||||||
| 68 | 0 | ▶ | sub attributes { | ||||||||
|
Subroutine
attributes: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 69 | 0 | my $class = shift; | |||||||||
| 70 | |||||||||||
| 71 | 0 | ▶ | my $a = $class->defMemoize('attributes',sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 72 | 0 | my ($class,$key) = @_; | |||||||||
| 73 | |||||||||||
| 74 | 0 | my $a = $class->defCumulate('Attributes'); | |||||||||
| 75 | 0 | @$a = sort @$a; | |||||||||
| 76 | 0 | return $a; | |||||||||
| 77 | 0 | }); | |||||||||
| 78 | |||||||||||
| 79 | 0 | ▶ | return wantarray? @$a: $a; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 80 | } | ||||||||||
| 81 | |||||||||||
| 82 | # ----------------------------------------------------------------------------- | ||||||||||
| 83 | |||||||||||
| 84 | =head3 contentAllowed() - Inhalt im Abschnitt erlaubt? | ||||||||||
| 85 | |||||||||||
| 86 | =head4 Synopsis | ||||||||||
| 87 | |||||||||||
| 88 | $bool = $class->contentAllowed; | ||||||||||
| 89 | |||||||||||
| 90 | =head4 Returns | ||||||||||
| 91 | |||||||||||
| 92 | Boolscher Wert | ||||||||||
| 93 | |||||||||||
| 94 | =head4 Description | ||||||||||
| 95 | |||||||||||
| 96 | Ermittele, ob Abschnitte des Entitätstyps einen Inhalt haben dürfen. | ||||||||||
| 97 | Wenn ja, liefert die Methode 1, andernfalls 0. | ||||||||||
| 98 | |||||||||||
| 99 | =cut | ||||||||||
| 100 | |||||||||||
| 101 | # ----------------------------------------------------------------------------- | ||||||||||
| 102 | |||||||||||
| 103 | 0 | ▶ | sub contentAllowed { | ||||||||
|
Subroutine
contentAllowed: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 104 | 0 | my $class = shift; | |||||||||
| 105 | |||||||||||
| 106 | 0 | ▶ | return $class->defMemoize('contentAllowed',sub { | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 107 | 0 | my ($class,$key) = @_; | |||||||||
| 108 | 0 | return $class->defSearch('ContentAllowed'); | |||||||||
| 109 | 0 | }); | |||||||||
| 110 | } | ||||||||||
| 111 | |||||||||||
| 112 | # ----------------------------------------------------------------------------- | ||||||||||
| 113 | |||||||||||
| 114 | =head1 VERSION | ||||||||||
| 115 | |||||||||||
| 116 | 1.240 | ||||||||||
| 117 | |||||||||||
| 118 | =head1 AUTHOR | ||||||||||
| 119 | |||||||||||
| 120 | Frank Seitz, L<http://fseitz.de/> | ||||||||||
| 121 | |||||||||||
| 122 | =head1 COPYRIGHT | ||||||||||
| 123 | |||||||||||
| 124 | Copyright (C) 2026 Frank Seitz | ||||||||||
| 125 | |||||||||||
| 126 | =head1 LICENSE | ||||||||||
| 127 | |||||||||||
| 128 | This code is free software; you can redistribute it and/or modify | ||||||||||
| 129 | it under the same terms as Perl itself. | ||||||||||
| 130 | |||||||||||
| 131 | =cut | ||||||||||
| 132 | |||||||||||
| 133 | # ----------------------------------------------------------------------------- | ||||||||||
| 134 | |||||||||||
| 135 | 3 | 1; | |||||||||
| 136 | |||||||||||
| 137 | # eof | ||||||||||