Professional Documents
Culture Documents
<table>
<thead><tr>
<th>Passenger name</th><th>Meal</th><th>Surcharge</th><th></th>
</tr></thead>
<!-- Todo: Generate table body -->
<tbody data-bind="foreach: seats">
<tr>
<td><input data-bind="value: name" /></td>
<td><select data-bind="options: $root.availableMeals, value: meal,
optionsText: 'mealName'"></select></td>
<td data-bind="text: meal().price"></td>
</tr>
<button data-bind="click: addSeat">Another Seat</button>
</tbody>
</table>d
// Editable data
self.seats = ko.observableArray([
new SeatReservation("Steve", self.availableMeals[1]),
new SeatReservation("Bert", self.availableMeals[2]),
new SeatReservation("Arsen", self.availableMeals[3])
]);
self.addSeat = function(){
self.seats.push(new SeatReservation("Max",self.availableMeals[0]));
ko.applyBindings(new ReservationsViewModel());
//declare(strict_types=1);
//
//namespace ArseniyInk\Ctrl\Observer;
//
//class ProcessFinalPriceObserver implements \Magento\Framework\Event\
ObserverInterface
//{
// public function execute(\Magento\Framework\Event\Observer $observer)
// {
// $price = $observer->getData('product');
// $price->setFinalPrice(12.00);
// var_dump($price);
// echo $price;
// return $this;
// }
//}
Message q +
Identity interface і cache +
Acl +
Resorses webapi +
Systems xml +
Node field +
Як показати що один модуль має йти за іншим +
Mysql engine +
Mysqlidex +
Db shema +
Db write list +
Ще форінкей +
Як перенести дані з одної таблиці в іншу при дропі db shema xml +
Singleton +
Task 2
1. +/-(+)
2. +/-(+)
3. +/-
4. +
<?php
declare(strict_types=1);
namespace ArseniyInk\Clients\Controller\Clients;
use Magento\Framework\Controller\Result\Redirect;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\View\Result\Page;
protected $messageManager;
protected $postModel;
protected $postResorceModel;
$this->postModel = $postModel;
$this->postResorceModel = $postResorceModel;
$this->postCollection = $postCollection;
return parent::__construct($context);
}
$postData = $this->getRequest()->getPostValue();
if (!$this->isRowExists($postData)) {
$this->messageManager->addNoticeMessage(
__('This user is not found in DB!')
);
$redirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
$redirect->setPath(self::LOGIN_PATH);
return $redirect;
} else {
return $page;
return (bool)$posts->getSize();
}
<div class="control">
<input type="text" id="lastname"
name="lastname"
value=""
title="Count Rooms"
class="input-text required-entry" data-
validate="{required:true}">
</div>
</div>'
return false;
}
}
<?php
/** @var \ArseniyInk\TaskTwo\Block\Index $block */
$options = $block->getOptions();
?>
<div class="insurance">
<label for="new_test_product_insurance_attribute"><strong><?=
__('Insurance'); ?></strong></label>
<select name="new_test_product_insurance_attribute"
id="new_test_product_insurance_attribute">
<?php foreach ($options as $option): ?>
<option value="<?= $option['value']; ?>"><?= $option['label'];
?></option>
<?php endforeach; ?>
</select>
</div>
<br/>
<!--</form>-->