Is it possible to add eZ Flow blocks via the API?

Author Message

Rainer Krauss

Monday 22 June 2009 2:40:57 am

Hi there,

I wonder if this is possible:

There is an installation of eZ Publish and eZ Flow. We intend to import content to it. Obviously, I'll have to use PHP scripts and the API to do the import - please correct me if I'm wrong here.

Our installation uses articles with eZ Flow blocks. From reading documentation, I know I can add articles via PHP and the API.
Question: Is it possible as well to add blocks to articles via PHP and the API?

Your reply much appreciated!

Sincerely,
Rainer Krauss

Heath

Monday 22 June 2009 3:02:55 am

Hello Rainer,

Yes indeed this is possible.
Importing content can be complicated.
Study the eZ PHP API while creating your script [0,1]

While I've note done so myself I would believe
you could use the very same apis to add blocks to articles.

Seems these apis are located within the ezflow extension [3]

Cheers,
Heath

[0] http://pubsvn.ez.no/doxygen/trunk/html/
[1] http://pubsvn.ez.no/doxygen/trunk/html/classeZContentObjectTreeNode.html
[3] http://svn.ez.no/svn/extensions/ezflow/trunk/packages/ezflow_extension/ezextension/ezflow/classes/ezpageblock.php

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:26:50
Script start
Timing: Jan 18 2025 19:26:50
Module start 'layout'
Timing: Jan 18 2025 19:26:50
Module start 'content'
Timing: Jan 18 2025 19:26:50
Module end 'content'
Timing: Jan 18 2025 19:26:50
Script end

Main resources:

Total runtime0.6731 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.0469152.6406
Module start 'layout' 0.00550.0031 740.687539.4766
Module start 'content' 0.00860.6631 780.1641529.5313
Module end 'content' 0.67170.0013 1,309.69538.1250
Script end 0.6730  1,317.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5111160.0002
Check MTime0.00140.2064160.0001
Mysql Total
Database connection0.00100.141410.0010
Mysqli_queries0.622692.5068540.0115
Looping result0.00050.0776520.0000
Template Total0.641495.320.3207
Template load0.00220.332720.0011
Template processing0.639294.967620.3196
Template load and register function0.00020.035410.0002
states
state_id_array0.00140.208010.0014
state_identifier_array0.00080.119420.0004
Override
Cache load0.00190.2785250.0001
Sytem overhead
Fetch class attribute can translate value0.00080.124720.0004
Fetch class attribute name0.00210.316430.0007
XML
Image XML parsing0.00070.107820.0004
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00080.1218170.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs