Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

type.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: type.php 6206 2001-07-19 12:19:22Z jakobn $
5 //
6 // Created on: <23-Oct-2000 17:53:46 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 // include_once( "ezarticle/classes/ezarticletype.php" );
28 // include_once( "ezarticle/classes/ezarticleattribute.php" );
29
30 if( $Command == "data" ) // return all the data in the category
31 {
32 $type = new eZArticleType();
33 if ( $type->get( $ID ) )
34 {
35 $attrs = $type->attributes();
36 $attr_arr = array();
37 foreach( $attrs as $attr )
38 {
39 $attr_arr[] = new eZXMLRPCStruct( array( "ID" => new eZXMLRPCInt( $attr->id() ),
40 "Name" => new eZXMLRPCString( $attr->name() ) ) );
41 }
42 $ReturnData = new eZXMLRPCStruct( array( "Name" => new eZXMLRPCString( $type->name() ),
43 "Attributes" => new eZXMLRPCArray( $attr_arr ) ) );
44 }
45 else
46 {
47 $Error = createErrorMessage( EZERROR_NONEXISTING_OBJECT );
48 }
49 }
50 else if( $Command == "delete" )
51 {
52 $type = new eZArticleType();
53 if ( $type->get( $ID ) )
54 {
55 $type->delete();
56 $ReturnData = new eZXMLRPCStruct( array( "Location" => createURLStruct( "ezarticle", "article", $ID ),
57 "UpdateType" => new eZXMLRPCString( $Command )
58 ) );
59 $Command = "update";
60 }
61 else
62 $Error = createErrorMessage( EZERROR_NONEXISTING_OBJECT );
63 }
64 ?>
eZArticleType
Definition: ezarticletype.php:46
eZXMLRPCArray
Definition: ezxmlrpcarray.php:37
eZXMLRPCInt
Definition: ezxmlrpcint.php:37
eZXMLRPCString
Definition: ezxmlrpcstring.php:37
eZXMLRPCStruct
Definition: ezxmlrpcstruct.php:37
$type
$type
Definition: classes/admin/linkselect.php:220
$Error
if(isset( $EditButton)) if(!empty( $CancelButton)) if(!empty( $PreviewButton)) if( $Action=="preview") switch( $Action) $Error
Definition: ezforum/user/messageedit.php:134
$ReturnData
$ReturnData
Definition: tag.php:48
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.